diff src/preferences.c @ 736:31d858f3272d

Fix signed vs unsigned warnings. In most cases, gint was used instead of guint.
author Laurent Monin <geeqie@norz.org>
date Thu, 22 May 2008 13:00:45 +0000
parents 3cf9cdf1ff65
children 11eadcaeb207
line wrap: on
line diff
--- a/src/preferences.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/preferences.c	Thu May 22 13:00:45 2008 +0000
@@ -519,13 +519,14 @@
 	gint n;
 
 	n = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
+	if (n < 0) return;
 
-	if (n >= 0 && n < sizeof(thumb_size_list) / sizeof(ThumbSize))
+	if ((guint) n < sizeof(thumb_size_list) / sizeof(ThumbSize))
 		{
 		c_options->thumbnails.max_width = thumb_size_list[n].w;
 		c_options->thumbnails.max_height = thumb_size_list[n].h;
 		}
-	else if (n > 0)
+	else
 		{
 		c_options->thumbnails.max_width = options->thumbnails.max_width;
 		c_options->thumbnails.max_height = options->thumbnails.max_height;
@@ -546,7 +547,7 @@
 	combo = gtk_combo_box_new_text();
 
 	current = -1;
-	for (i = 0; i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++)
+	for (i = 0; (guint) i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++)
 		{
 		gint w, h;
 		gchar *buf;