[gtkhtml] Bug 641833 - Cleanups and fixes for compiler warnings



commit 3da8a1663a8b4a50c5bca47a8d38b785d93bd98a
Author: Kjartan Maraas <kmaraas gnome org>
Date:   Fri Feb 18 18:53:29 2011 -0500

    Bug 641833 - Cleanups and fixes for compiler warnings

 gtkhtml/gtkhtml.c                  |    6 +++---
 gtkhtml/htmlengine-edit-movement.c |   12 ++++++------
 gtkhtml/htmlengine-save.c          |    1 -
 gtkhtml/htmlengine.c               |   22 ++++++++--------------
 gtkhtml/testgtkhtml.c              |    1 -
 5 files changed, 17 insertions(+), 25 deletions(-)
---
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 43c9987..9fd4486 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -185,7 +185,7 @@ static void update_primary_selection    (GtkHTML *html);
 static void clipboard_paste_received_cb (GtkClipboard     *clipboard,
 					 GtkSelectionData *selection_data,
 					 gpointer          user_data);
-static gint motion_notify_event (GtkWidget *widget, GdkEventMotion *event);
+static gboolean motion_notify_event (GtkWidget *widget, GdkEventMotion *event);
 
 /* keybindings signal hadlers */
 static void     scroll                 (GtkHTML *html, GtkOrientation orientation, GtkScrollType scroll_type, gfloat position);
@@ -1841,9 +1841,9 @@ shift_to_iframe_parent (GtkWidget *widget, gint *x, gint *y)
 	return widget;
 }
 
-static gint
+static gboolean
 motion_notify_event (GtkWidget *widget,
-		     GdkEventMotion *event)
+                     GdkEventMotion *event)
 {
 	GdkWindow *window;
 	GdkWindow *bin_window;
diff --git a/gtkhtml/htmlengine-edit-movement.c b/gtkhtml/htmlengine-edit-movement.c
index 8139236..8ba7fa6 100644
--- a/gtkhtml/htmlengine-edit-movement.c
+++ b/gtkhtml/htmlengine-edit-movement.c
@@ -256,15 +256,15 @@ html_engine_end_of_paragraph (HTMLEngine *engine)
 
 gint
 html_engine_scroll_down (HTMLEngine *engine,
-			 gint amount)
+                         gint amount)
 {
 	HTMLCursor *cursor;
 	HTMLCursor prev_cursor;
 	gint start_x, start_y;
 	gint x, y, new_y;
 
-	g_return_val_if_fail (engine != NULL, FALSE);
-	g_return_val_if_fail (HTML_IS_ENGINE (engine), FALSE);
+	g_return_val_if_fail (engine != NULL, 0);
+	g_return_val_if_fail (HTML_IS_ENGINE (engine), 0);
 
 	cursor = engine->cursor;
 
@@ -309,15 +309,15 @@ html_engine_scroll_down (HTMLEngine *engine,
 
 gint
 html_engine_scroll_up (HTMLEngine *engine,
-		       gint amount)
+                       gint amount)
 {
 	HTMLCursor *cursor;
 	HTMLCursor prev_cursor;
 	gint start_x, start_y;
 	gint x, y, new_y;
 
-	g_return_val_if_fail (engine != NULL, FALSE);
-	g_return_val_if_fail (HTML_IS_ENGINE (engine), FALSE);
+	g_return_val_if_fail (engine != NULL, 0);
+	g_return_val_if_fail (HTML_IS_ENGINE (engine), 0);
 
 	cursor = engine->cursor;
 
diff --git a/gtkhtml/htmlengine-save.c b/gtkhtml/htmlengine-save.c
index 4feede9..c6c1318 100644
--- a/gtkhtml/htmlengine-save.c
+++ b/gtkhtml/htmlengine-save.c
@@ -24,7 +24,6 @@
     <Daniel Veillard w3 org>.
 */
 
-#include <config.h>
 #include <string.h>
 
 #include "config.h"
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index e41d89c..8be71c7 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -52,9 +52,7 @@
 #include "htmlengine-print.h"
 #include "htmlcolor.h"
 #include "htmlinterval.h"
-#include "htmlobject.h"
 #include "htmlsettings.h"
-#include "htmltext.h"
 #include "htmltokenizer.h"
 #include "htmltype.h"
 #include "htmlundo.h"
@@ -77,7 +75,6 @@
 #include "htmltext.h"
 #include "htmltextslave.h"
 #include "htmlclueflow.h"
-#include "htmlstack.h"
 #include "htmlstringtokenizer.h"
 #include "htmlselection.h"
 #include "htmlform.h"
@@ -5039,7 +5036,6 @@ html_engine_stream_end (GtkHTMLStream *stream,
 static void
 html_engine_draw_real (HTMLEngine *e, gint x, gint y, gint width, gint height, gboolean expose)
 {
-	GtkWidget *parent;
 	gint x1, x2, y1, y2;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
@@ -5051,8 +5047,6 @@ html_engine_draw_real (HTMLEngine *e, gint x, gint y, gint width, gint height, g
 	if (width == 0 || height == 0)
 		return;
 
-	parent = gtk_widget_get_parent (GTK_WIDGET (e->widget));
-
 	e->expose = expose;
 
 	x1 = x;
@@ -5139,13 +5133,13 @@ html_engine_draw (HTMLEngine *e, gint x, gint y, gint width, gint height)
 static gboolean
 redraw_idle (HTMLEngine *e)
 {
-	g_return_val_if_fail (HTML_IS_ENGINE (e), 0);
+	g_return_val_if_fail (HTML_IS_ENGINE (e), FALSE);
 
-       e->redraw_idle_id = 0;
-       e->need_redraw = FALSE;
-       html_engine_queue_redraw_all (e);
+	e->redraw_idle_id = 0;
+	e->need_redraw = FALSE;
+	html_engine_queue_redraw_all (e);
 
-       return FALSE;
+	return FALSE;
 }
 
 void
@@ -5271,7 +5265,7 @@ html_engine_calc_size (HTMLEngine *e, GList **changed_objs)
 	gint max_width; /* , max_height; */
 	gboolean redraw_whole;
 
-	g_return_val_if_fail (HTML_IS_ENGINE (e), 0);
+	g_return_val_if_fail (HTML_IS_ENGINE (e), FALSE);
 
 	if (e->clue == 0)
 		return FALSE;
@@ -5870,7 +5864,7 @@ check_cursor (HTMLEngine *e)
 }
 #endif
 
-static gint
+static gboolean
 thaw_idle (gpointer data)
 {
 	HTMLEngine *e = HTML_ENGINE (data);
@@ -5878,7 +5872,7 @@ thaw_idle (gpointer data)
 	gboolean redraw_whole;
 	gint w, h;
 
-	g_return_val_if_fail (HTML_IS_ENGINE (e), 0);
+	g_return_val_if_fail (HTML_IS_ENGINE (e), FALSE);
 
 	DF (printf ("thaw_idle %d\n", e->freeze_count); fflush (stdout));
 
diff --git a/gtkhtml/testgtkhtml.c b/gtkhtml/testgtkhtml.c
index e6bb1e6..20d379a 100644
--- a/gtkhtml/testgtkhtml.c
+++ b/gtkhtml/testgtkhtml.c
@@ -39,7 +39,6 @@
 
 #include <libsoup/soup.h>
 
-#include "config.h"
 #include "gtkhtml.h"
 #include "htmlurl.h"
 #include "htmlengine.h"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]