changeset 691:631d626c1f6b

Fix some incomplete initialization warnings.
author zas_
date Mon, 19 May 2008 09:27:30 +0000
parents a9ba46e466d2
children 1af0ce40cf90
files src/cache-loader.c src/cellrenderericon.c src/image.c src/layout_util.c src/pixbuf-renderer.c
diffstat 5 files changed, 38 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/src/cache-loader.c	Mon May 19 08:46:37 2008 +0000
+++ b/src/cache-loader.c	Mon May 19 09:27:30 2008 +0000
@@ -134,7 +134,9 @@
 			text = exif_get_data_as_text(exif, "formatted.DateTime");
 			if (text)
 				{
-				struct tm t = { 0 };
+				struct tm t;
+
+				memset(&t, 0, sizeof(t));
 
 				if (sscanf(text, "%d:%d:%d %d:%d:%d", &t.tm_year, &t.tm_mon, &t.tm_mday,
 					   &t.tm_hour, &t.tm_min, &t.tm_sec) == 6)
--- a/src/cellrenderericon.c	Mon May 19 08:46:37 2008 +0000
+++ b/src/cellrenderericon.c	Mon May 19 09:27:30 2008 +0000
@@ -79,15 +79,16 @@
 		{
 		static const GTypeInfo cell_icon_info =
 			{
-			sizeof(GQvCellRendererIconClass),
+			sizeof(GQvCellRendererIconClass), /* class_size */
 			NULL,		/* base_init */
 			NULL,		/* base_finalize */
-			(GClassInitFunc) gqv_cell_renderer_icon_class_init,
+			(GClassInitFunc) gqv_cell_renderer_icon_class_init, /* class_init */
 			NULL,		/* class_finalize */
 			NULL,		/* class_data */
-			sizeof(GQvCellRendererIcon),
+			sizeof(GQvCellRendererIcon), /* instance_size */
 			0,		/* n_preallocs */
-			(GInstanceInitFunc) gqv_cell_renderer_icon_init,
+			(GInstanceInitFunc) gqv_cell_renderer_icon_init, /* instance_init */
+			NULL,		/* value_table */
 			};
 
 		cell_icon_type = g_type_register_static(GTK_TYPE_CELL_RENDERER,
--- a/src/image.c	Mon May 19 08:46:37 2008 +0000
+++ b/src/image.c	Mon May 19 09:27:30 2008 +0000
@@ -549,12 +549,11 @@
 
 void image_alter(ImageWindow *imd, AlterType type)
 {
-
-	const static gint rotate_90[]    = {1,   6, 7, 8, 5, 2, 3, 4, 1};
-	const static gint rotate_90_cc[] = {1,   8, 5, 6, 7, 4, 1, 2, 3};
-	const static gint rotate_180[]   = {1,   3, 4, 1, 2, 7, 8, 5, 6};
-	const static gint mirror[]       = {1,   2, 1, 4, 3, 6, 5, 8, 7};
-	const static gint flip[]         = {1,   4, 3, 2, 1, 8, 7, 6, 5};
+	static const gint rotate_90[]    = {1,   6, 7, 8, 5, 2, 3, 4, 1};
+	static const gint rotate_90_cc[] = {1,   8, 5, 6, 7, 4, 1, 2, 3};
+	static const gint rotate_180[]   = {1,   3, 4, 1, 2, 7, 8, 5, 6};
+	static const gint mirror[]       = {1,   2, 1, 4, 3, 6, 5, 8, 7};
+	static const gint flip[]         = {1,   4, 3, 2, 1, 8, 7, 6, 5};
 
 
 	if (!imd || !imd->pr) return;
--- a/src/layout_util.c	Mon May 19 08:46:37 2008 +0000
+++ b/src/layout_util.c	Mon May 19 09:27:30 2008 +0000
@@ -1043,16 +1043,16 @@
 #define CB G_CALLBACK
 
 static GtkActionEntry menu_entries[] = {
-  { "FileMenu",		NULL,		N_("_File") },
-  { "GoMenu",		NULL,		N_("_Go") },
-  { "EditMenu",		NULL,		N_("_Edit") },
-  { "SelectMenu",	NULL,		N_("_Select") },
-  { "AdjustMenu",	NULL,		N_("_Adjust") },
-  { "ViewMenu",		NULL,		N_("_View") },
-  { "DirMenu",          NULL,           N_("_View Directory as") },
-  { "ZoomMenu",		NULL,		N_("_Zoom") },
-  { "SplitMenu",	NULL,		N_("_Split") },
-  { "HelpMenu",		NULL,		N_("_Help") },
+  { "FileMenu",		NULL,		N_("_File"),			NULL, 		NULL, 	NULL },
+  { "GoMenu",		NULL,		N_("_Go"),			NULL, 		NULL, 	NULL },
+  { "EditMenu",		NULL,		N_("_Edit"),			NULL, 		NULL, 	NULL },
+  { "SelectMenu",	NULL,		N_("_Select"),			NULL, 		NULL, 	NULL },
+  { "AdjustMenu",	NULL,		N_("_Adjust"),			NULL, 		NULL, 	NULL },
+  { "ViewMenu",		NULL,		N_("_View"),			NULL, 		NULL, 	NULL },
+  { "DirMenu",          NULL,           N_("_View Directory as"),	NULL, 		NULL, 	NULL },
+  { "ZoomMenu",		NULL,		N_("_Zoom"),			NULL, 		NULL, 	NULL },
+  { "SplitMenu",	NULL,		N_("_Split"),			NULL, 		NULL, 	NULL },
+  { "HelpMenu",		NULL,		N_("_Help"),			NULL, 		NULL, 	NULL },
 
   { "FirstImage",	GTK_STOCK_GOTO_TOP,	N_("_First Image"),	"Home",		NULL,	CB(layout_menu_image_first_cb) },
   { "PrevImage",	GTK_STOCK_GO_UP,   	N_("_Previous Image"),	"BackSpace",	NULL,	CB(layout_menu_image_prev_cb) },
@@ -1067,7 +1067,7 @@
   { "NewWindow",	GTK_STOCK_NEW,	N_("New _window"),	NULL,		NULL,	CB(layout_menu_new_window_cb) },
   { "NewCollection",	GTK_STOCK_INDEX,N_("_New collection"),	"C",		NULL,	CB(layout_menu_new_cb) },
   { "OpenCollection",	GTK_STOCK_OPEN,	N_("_Open collection..."),"O",		NULL,	CB(layout_menu_open_cb) },
-  { "OpenRecent",	NULL,		N_("Open _recent") },
+  { "OpenRecent",	NULL,		N_("Open _recent"),	NULL,		NULL,	NULL },
   { "Search",		GTK_STOCK_FIND,	N_("_Search..."),	"F3",		NULL,	CB(layout_menu_search_cb) },
   { "FindDupes",	GTK_STOCK_FIND,	N_("_Find duplicates..."),"D",		NULL,	CB(layout_menu_dupes_cb) },
   { "PanView",		NULL,		N_("Pan _view"),	"<control>J",	NULL,	CB(layout_menu_pan_cb) },
@@ -1152,16 +1152,16 @@
 };
 
 static GtkToggleActionEntry menu_toggle_entries[] = {
-  { "Thumbnails",	NULL,		N_("_Thumbnails"),	"T",		NULL,	CB(layout_menu_thumb_cb) },
-  { "ShowMarks",        NULL,		N_("Show _Marks"),	"M",		NULL,	CB(layout_menu_marks_cb) },
-  { "FloatTools",	NULL,		N_("_Float file list"),	"L",		NULL,	CB(layout_menu_float_cb) },
-  { "HideToolbar",	NULL,		N_("Hide tool_bar"),	NULL,		NULL,	CB(layout_menu_toolbar_cb) },
-  { "SBarKeywords",	NULL,		N_("_Keywords"),	"<control>K",	NULL,	CB(layout_menu_bar_info_cb) },
-  { "SBarExif",		NULL,		N_("E_xif data"),	"<control>E",	NULL,	CB(layout_menu_bar_exif_cb) },
-  { "SBarSort",		NULL,		N_("Sort _manager"),	"<control>S",	NULL,	CB(layout_menu_bar_sort_cb) },
-  { "ConnectScroll",	NULL,		N_("Co_nnected scroll"),	"<control>U",	NULL,	CB(layout_menu_connect_scroll_cb) },
-  { "ConnectZoom",	NULL,		N_("C_onnected zoom"),	"<control>Y",	NULL,	CB(layout_menu_connect_zoom_cb) },
-  { "SlideShow",	NULL,		N_("Toggle _slideshow"),"S",		NULL,	CB(layout_menu_slideshow_cb) },
+  { "Thumbnails",	NULL,		N_("_Thumbnails"),	"T",		NULL,	CB(layout_menu_thumb_cb),	 FALSE },
+  { "ShowMarks",        NULL,		N_("Show _Marks"),	"M",		NULL,	CB(layout_menu_marks_cb),	 FALSE  },
+  { "FloatTools",	NULL,		N_("_Float file list"),	"L",		NULL,	CB(layout_menu_float_cb),	 FALSE  },
+  { "HideToolbar",	NULL,		N_("Hide tool_bar"),	NULL,		NULL,	CB(layout_menu_toolbar_cb),	 FALSE  },
+  { "SBarKeywords",	NULL,		N_("_Keywords"),	"<control>K",	NULL,	CB(layout_menu_bar_info_cb),	 FALSE  },
+  { "SBarExif",		NULL,		N_("E_xif data"),	"<control>E",	NULL,	CB(layout_menu_bar_exif_cb),	 FALSE  },
+  { "SBarSort",		NULL,		N_("Sort _manager"),	"<control>S",	NULL,	CB(layout_menu_bar_sort_cb),	 FALSE  },
+  { "ConnectScroll",	NULL,		N_("Co_nnected scroll"),"<control>U",	NULL,	CB(layout_menu_connect_scroll_cb), FALSE  },
+  { "ConnectZoom",	NULL,		N_("C_onnected zoom"),	"<control>Y",	NULL,	CB(layout_menu_connect_zoom_cb), FALSE  },
+  { "SlideShow",	NULL,		N_("Toggle _slideshow"),"S",		NULL,	CB(layout_menu_slideshow_cb),	 FALSE  },
 };
 
 static GtkRadioActionEntry menu_radio_entries[] = {
--- a/src/pixbuf-renderer.c	Mon May 19 08:46:37 2008 +0000
+++ b/src/pixbuf-renderer.c	Mon May 19 09:27:30 2008 +0000
@@ -234,15 +234,16 @@
 		{
 		static const GTypeInfo pixbuf_renderer_info =
 			{
-			sizeof(PixbufRendererClass),
+			sizeof(PixbufRendererClass), /* class_size */
 			NULL,		/* base_init */
 			NULL,		/* base_finalize */
 			(GClassInitFunc)pixbuf_renderer_class_init,
 			NULL,		/* class_finalize */
 			NULL,		/* class_data */
-			sizeof(PixbufRenderer),
+			sizeof(PixbufRenderer), /* instance_size */
 			0,		/* n_preallocs */
-			(GInstanceInitFunc)pixbuf_renderer_init,
+			(GInstanceInitFunc)pixbuf_renderer_init, /* instance_init */
+			NULL,		/* value_table */
 			};
 
 		pixbuf_renderer_type = g_type_register_static(GTK_TYPE_EVENT_BOX, "PixbufRenderer",