sparse cleanups for eel



Here's a patch that tries to quench a bunch of warnings from sparse/gcc.

Cheers
Kjartan

Index: eel/eel-canvas.c
===================================================================
--- eel/eel-canvas.c	(revisjon 1841)
+++ eel/eel-canvas.c	(arbeidskopi)
@@ -1542,7 +1542,7 @@ eel_canvas_group_point (EelCanvasItem *i
 	return best;
 }
 
-void
+static void
 eel_canvas_group_translate (EelCanvasItem *item, double dx, double dy)
 {
         EelCanvasGroup *group;
Index: eel/eel-background.c
===================================================================
--- eel/eel-background.c	(revisjon 1841)
+++ eel/eel-background.c	(arbeidskopi)
@@ -1337,7 +1337,7 @@ draw_pixbuf_tiled_aa (GdkPixbuf *pixbuf,
 }
 
 /* draw the background on the anti-aliased canvas */
-void
+static void
 eel_background_draw_aa (EelBackground *background, EelCanvasBuf *buffer)
 {	
 	g_return_if_fail (EEL_IS_BACKGROUND (background));
@@ -1392,7 +1392,7 @@ eel_background_draw_aa (EelBackground *b
 	buffer->is_buf = TRUE;
 }
 
-void
+static void
 eel_background_draw_to_canvas (EelBackground *background,
 			       EelCanvasBuf *buffer,
 			       int entire_width,
Index: eel/eel-gtk-extensions.c
===================================================================
--- eel/eel-gtk-extensions.c	(revisjon 1841)
+++ eel/eel-gtk-extensions.c	(arbeidskopi)
@@ -216,7 +216,7 @@ sanity_check_window_position (int *left,
 }
 
 static void
-sanity_check_window_dimensions (int *width, int *height)
+sanity_check_window_dimensions (guint *width, guint *height)
 {
 	g_assert (width != NULL);
 	g_assert (height != NULL);
@@ -259,8 +259,8 @@ eel_gtk_window_set_initial_geometry (Gtk
 	int screen_width, screen_height;
 
 	g_return_if_fail (GTK_IS_WINDOW (window));
-	g_return_if_fail (!(geometry_flags & EEL_GDK_WIDTH_VALUE) || width > 0);
-	g_return_if_fail (!(geometry_flags & EEL_GDK_HEIGHT_VALUE) || height > 0);
+	g_return_if_fail (!(geometry_flags & EEL_GDK_WIDTH_VALUE));
+	g_return_if_fail (!(geometry_flags & EEL_GDK_HEIGHT_VALUE));
 
 	/* Setting the default size doesn't work when the window is already showing.
 	 * Someday we could make this move an already-showing window, but we don't
@@ -295,7 +295,7 @@ eel_gtk_window_set_initial_geometry (Gtk
 
 	if ((geometry_flags & EEL_GDK_WIDTH_VALUE) && (geometry_flags & EEL_GDK_HEIGHT_VALUE)) {
 		sanity_check_window_dimensions (&width, &height);
-		gtk_window_set_default_size (GTK_WINDOW (window), width, height);
+		gtk_window_set_default_size (GTK_WINDOW (window), (int)width, (int)height);
 	}
 }
 
Index: eel/eel-enumeration.c
===================================================================
--- eel/eel-enumeration.c	(revisjon 1841)
+++ eel/eel-enumeration.c	(arbeidskopi)
@@ -670,8 +670,8 @@ eel_enumeration_id_contains_name (const 
 	g_return_val_if_fail (name[0] != '\0', FALSE);
 
 	entry = enumeration_table_lookup (id);
-	g_return_val_if_fail (entry != NULL, -1);
-	g_return_val_if_fail (entry->enumeration != NULL, -1);
+	g_return_val_if_fail (entry != NULL, FALSE);
+	g_return_val_if_fail (entry->enumeration != NULL, FALSE);
 
 	return eel_enumeration_contains_name (entry->enumeration, name);
 }
Index: eel/eel-image-table.c
===================================================================
--- eel/eel-image-table.c	(revisjon 1841)
+++ eel/eel-image-table.c	(arbeidskopi)
@@ -179,7 +179,7 @@ eel_image_table_class_init (EelImageTabl
 							   G_TYPE_POINTER);
 }
 
-void
+static void
 eel_image_table_init (EelImageTable *image_table)
 {
 	GTK_WIDGET_SET_FLAGS (image_table, GTK_NO_WINDOW);
Index: eel/eel-labeled-image.c
===================================================================
--- eel/eel-labeled-image.c	(revisjon 1841)
+++ eel/eel-labeled-image.c	(arbeidskopi)
@@ -295,7 +295,7 @@ eel_labeled_image_class_init (EelLabeled
 				      G_PARAM_READWRITE));
 }
 
-void
+static void
 eel_labeled_image_init (EelLabeledImage *labeled_image)
 {
 	GTK_WIDGET_SET_FLAGS (labeled_image, GTK_NO_WINDOW);


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