changeset 736:a7289f9e8d29

Fix signed vs unsigned warnings. In most cases, gint was used instead of guint.
author zas_
date Thu, 22 May 2008 13:00:45 +0000
parents df6c11709106
children 8a8873e7a552
files src/exif-common.c src/filefilter.c src/filefilter.h src/image-overlay.c src/img-view.c src/info.c src/layout.c src/layout.h src/layout_image.c src/layout_util.c src/logwindow.c src/options.h src/pixbuf-renderer.c src/preferences.c src/print.c src/slideshow.c src/typedefs.h src/ui_bookmark.c src/ui_spinner.c src/view_dir.c src/view_file.c src/view_file.h src/view_file_icon.c src/view_file_icon.h src/view_file_list.c src/view_file_list.h
diffstat 26 files changed, 92 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/src/exif-common.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/exif-common.c	Thu May 22 13:00:45 2008 +0000
@@ -303,7 +303,7 @@
 	r = exif_get_rational(exif, "Exif.Photo.SubjectDistance", &sign);
 	if (!r) return NULL;
 
-	if ((long)r->num == 0xffffffff) return g_strdup(_("infinity"));
+	if ((long)r->num == (long)0xffffffff) return g_strdup(_("infinity"));
 	if ((long)r->num == 0) return g_strdup(_("unknown"));
 
 	n = exif_rational_to_double(r, sign);
--- a/src/filefilter.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/filefilter.c	Thu May 22 13:00:45 2008 +0000
@@ -42,7 +42,7 @@
 }
 
 static FilterEntry *filter_entry_new(const gchar *key, const gchar *description,
-				     const gchar *extensions, FileFormatClass file_class, gint enabled)
+				     const gchar *extensions, FileFormatClass file_class, gboolean enabled)
 {
 	FilterEntry *fe;
 
@@ -105,7 +105,7 @@
 void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gint enabled)
 {
 	gchar *key;
-	gint n;
+	guint n;
 
 	key = g_strdup("user0");
 	n = 1;
@@ -172,7 +172,7 @@
 		gchar *desc;
 		gchar **extensions;
 		GString *filter = NULL;
-		gint i;
+		guint i;
 
 		format = work->data;
 		work = work->next;
@@ -256,7 +256,7 @@
 	while (*p != '\0')
 		{
 		const gchar *b;
-		gint l = 0;
+		guint l = 0;
 
 		b = p;
 		while (*p != '\0' && *p != ';')
@@ -274,7 +274,7 @@
 void filter_rebuild(void)
 {
 	GList *work;
-	gint i;
+	guint i;
 
 	string_list_free(extension_list);
 	extension_list = NULL;
@@ -316,7 +316,7 @@
 gint filter_name_exists(const gchar *name)
 {
 	GList *work;
-	gint ln;
+	guint ln;
 
 	if (!extension_list || options->file_filter.disable) return TRUE;
 
@@ -325,7 +325,7 @@
 	while (work)
 		{
 		gchar *filter = work->data;
-		gint lf = strlen(filter);
+		guint lf = strlen(filter);
 
 		if (ln >= lf)
 			{
@@ -341,7 +341,7 @@
 gint filter_file_class(const gchar *name, FileFormatClass file_class)
 {
 	GList *work;
-	gint ln;
+	guint ln;
 
 	if (file_class < 0 || file_class >= FILE_FORMAT_CLASSES)
 		{
@@ -354,7 +354,7 @@
 	while (work)
 		{
 		gchar *filter = work->data;
-		gint lf = strlen(filter);
+		guint lf = strlen(filter);
 
 		if (ln >= lf)
 			{
@@ -395,7 +395,7 @@
 	gchar *ext;
 	gchar *desc;
 	gint enabled = TRUE;
-	gint file_class;
+	guint file_class;
 
 	if (!text || text[0] != '"') return;
 
@@ -405,9 +405,9 @@
 	ext = quoted_value(p, &p);
 	desc = quoted_value(p, &p);
 
-	file_class = strtol(p, NULL, 10);
+	file_class = strtoul(p, NULL, 10);
 
-	if (file_class < 0 || file_class >= FILE_FORMAT_CLASSES) file_class = FORMAT_CLASS_UNKNOWN;
+	if (file_class >= FILE_FORMAT_CLASSES) file_class = FORMAT_CLASS_UNKNOWN;
 
 	if (key && key[0] == '#')
 		{
--- a/src/filefilter.h	Thu May 22 11:28:35 2008 +0000
+++ b/src/filefilter.h	Thu May 22 13:00:45 2008 +0000
@@ -21,7 +21,7 @@
 	gchar *description;
 	gchar *extensions;
 	FileFormatClass file_class;
-	gint enabled;
+	gboolean enabled;
 };
 
 /* you can change, but not add or remove entries from the returned list */
--- a/src/image-overlay.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/image-overlay.c	Thu May 22 13:00:45 2008 +0000
@@ -209,8 +209,8 @@
 {
 	gchar delim = '%', imp = '|', sep[] = " - ";
 	gchar *start, *end;
-	gint pos, prev;
-	gint last;
+	guint pos, prev;
+	guint last;
 	gchar *name, *data;
 	GString *new;
 	gchar *ret;
@@ -226,7 +226,7 @@
 
 	while (TRUE)
 		{
-		gint limit = 0;
+		guint limit = 0;
 		gchar *trunc = NULL;
 		gchar *limpos = NULL;
 		gchar *extra = NULL;
@@ -262,7 +262,7 @@
 			}
 
 		if (limpos)
-			limit = atoi(limpos);
+			limit = (guint) atoi(limpos);
 
 		if (extrapos)
 			extra = g_strndup(extrapos, end - extrapos);
@@ -322,7 +322,7 @@
 				gchar *left = NULL;
 				gchar *right = extra;
 				gchar *p;
-				gint len = strlen(extra);
+				guint len = strlen(extra);
 				
 				/* Search and replace "\n" by a newline character */
 				for (p = extra; *p; p++, len--)
--- a/src/img-view.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/img-view.c	Thu May 22 13:00:45 2008 +0000
@@ -639,7 +639,7 @@
 				break;
 			}
 		}
-	else if ( (state & GDK_SHIFT_MASK) != (options->mousewheel_scrolls))
+	else if ( (state & GDK_SHIFT_MASK) != (guint) (options->mousewheel_scrolls))
 		{
 		switch (direction)
 			{
--- a/src/info.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/info.c	Thu May 22 13:00:45 2008 +0000
@@ -51,7 +51,7 @@
 struct _InfoTabsPos
 {
 	TabData *(*func)(InfoData *id);
-	gint pos;
+	guint pos;
 };
 
 static GList *info_tabs_pos_list = NULL;
@@ -496,7 +496,7 @@
 
 gchar *info_tab_default_order(void)
 {
-	gint i;
+	guint i;
 	static gchar str[G_N_ELEMENTS(info_tab_new_funcs) + 1];
 
 	for (i = 0; i < G_N_ELEMENTS(info_tab_new_funcs); i++)
@@ -521,7 +521,7 @@
 	work = info_tabs_pos_list;
 	while (work)
 		{
-		gint i;
+		guint i;
 		InfoTabsPos *t = work->data;
 		work = work->next;
 
@@ -547,15 +547,15 @@
 
 	if (!info_tabs_pos_list)
 		{
-		gint count = 0;
-		gint i;
+		guint count = 0;
+		guint i;
 		gchar *order = options->properties.tabs_order;
 		
 		for (i = 0; i < strlen(order); i++)
 			{
-			gint n = order[i] - '1';
+			guint n = order[i] - '1';
 
-			if (n < 0 || n >= G_N_ELEMENTS(info_tab_new_funcs)) break;
+			if (n >= G_N_ELEMENTS(info_tab_new_funcs)) break;
 			count++;
 			}
 
@@ -564,9 +564,9 @@
 
 		for (i = 0; i < strlen(order); i++)
 			{
-			gint n = order[i] - '1';
+			guint n = order[i] - '1';
 
-			if (n < 0 || n >= G_N_ELEMENTS(info_tab_new_funcs)) continue;
+			if (n >= G_N_ELEMENTS(info_tab_new_funcs)) continue;
 			if (g_list_find(info_tabs_pos_list, info_tab_new_funcs[n])) continue;
 			info_tabs_pos_list_append(info_tab_new_funcs[n]);
 			}
--- a/src/layout.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/layout.c	Thu May 22 13:00:45 2008 +0000
@@ -517,9 +517,9 @@
 
 	if (!text)
 		{
-		gint n;
+		guint n;
 		gint64 n_bytes = 0;
-		gint s;
+		guint s;
 		gint64 s_bytes = 0;
 		const gchar *ss;
 
@@ -776,7 +776,7 @@
 	return NULL;
 }
 
-gint layout_list_count(LayoutWindow *lw, gint64 *bytes)
+guint layout_list_count(LayoutWindow *lw, gint64 *bytes)
 {
 	if (!layout_valid(&lw)) return 0;
 
@@ -844,7 +844,7 @@
 	return NULL;
 }
 
-gint layout_selection_count(LayoutWindow *lw, gint64 *bytes)
+guint layout_selection_count(LayoutWindow *lw, gint64 *bytes)
 {
 	if (!layout_valid(&lw)) return 0;
 
--- a/src/layout.h	Thu May 22 11:28:35 2008 +0000
+++ b/src/layout.h	Thu May 22 13:00:45 2008 +0000
@@ -38,7 +38,7 @@
 void layout_status_update_all(LayoutWindow *lw);
 
 GList *layout_list(LayoutWindow *lw);
-gint layout_list_count(LayoutWindow *lw, gint64 *bytes);
+guint layout_list_count(LayoutWindow *lw, gint64 *bytes);
 FileData *layout_list_get_fd(LayoutWindow *lw, gint index);
 gint layout_list_get_index(LayoutWindow *lw, const gchar *path);
 void layout_list_sync_fd(LayoutWindow *lw, FileData *fd);
@@ -46,7 +46,7 @@
 GList *layout_selection_list(LayoutWindow *lw);
 /* return list of pointers to int for selection */
 GList *layout_selection_list_by_index(LayoutWindow *lw);
-gint layout_selection_count(LayoutWindow *lw, gint64 *bytes);
+guint layout_selection_count(LayoutWindow *lw, gint64 *bytes);
 void layout_select_all(LayoutWindow *lw);
 void layout_select_none(LayoutWindow *lw);
 void layout_select_invert(LayoutWindow *lw);
--- a/src/layout_image.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/layout_image.c	Thu May 22 13:00:45 2008 +0000
@@ -991,7 +991,7 @@
 
 		if (!isfile(path))
 			{
-			if (row < layout_list_count(lw, NULL) - 1)
+			if ((guint) row < layout_list_count(lw, NULL) - 1)
 				{
 				layout_image_next(lw);
 				}
@@ -1404,7 +1404,7 @@
 
 	if (current >= 0)
 		{
-		if (current < layout_list_count(lw, NULL) - 1)
+		if ((guint) current < layout_list_count(lw, NULL) - 1)
 			{
 			layout_image_set_index(lw, current + 1);
 			}
@@ -1622,7 +1622,7 @@
 				break;
 			}
 		}
-	else if ( (state & GDK_SHIFT_MASK) != (options->mousewheel_scrolls))
+	else if ( (state & GDK_SHIFT_MASK) != (guint) (options->mousewheel_scrolls))
 		{
 		switch (direction)
 			{
--- a/src/layout_util.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/layout_util.c	Thu May 22 13:00:45 2008 +0000
@@ -62,9 +62,9 @@
 	GDK_End,	GDK_KP_End
 };
 
-static gint layout_key_match(guint keyval)
+static gboolean layout_key_match(guint keyval)
 {
-	gint i;
+	guint i;
 
 	for (i = 0; i < sizeof(tree_key_overrides) / sizeof(guint); i++)
 		{
--- a/src/logwindow.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/logwindow.c	Thu May 22 13:00:45 2008 +0000
@@ -28,7 +28,7 @@
 	
 	GdkColor colors[LOG_COUNT];
 
-	gint lines;
+	guint lines;
 };
 
 typedef struct _LogDef LogDef;
@@ -208,7 +208,7 @@
 	GtkTextView *text;
 	GtkTextBuffer *buffer;
 	GtkTextIter iter;
-	gint line_limit = 1000; //FIXME: option
+	guint line_limit = 1000; //FIXME: option
 	static GList *memory = NULL;
 
 	if (logwindow == NULL)
--- a/src/options.h	Thu May 22 11:28:35 2008 +0000
+++ b/src/options.h	Thu May 22 13:00:45 2008 +0000
@@ -20,7 +20,7 @@
 	/* ui */
 	gint progressive_key_scrolling;
 	gint place_dialogs_under_mouse;
-	gint mousewheel_scrolls;
+	gboolean mousewheel_scrolls;
 	gint show_icon_names;
 	gint show_copy_path;
 
--- a/src/pixbuf-renderer.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/pixbuf-renderer.c	Thu May 22 13:00:45 2008 +0000
@@ -1899,7 +1899,7 @@
 static void pr_tile_free_space(PixbufRenderer *pr, guint space, ImageTile *it)
 {
 	GList *work;
-	gint tile_max;
+	guint tile_max;
 
 	work = g_list_last(pr->tiles);
 
--- 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;
--- a/src/print.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/print.c	Thu May 22 13:00:45 2008 +0000
@@ -177,6 +177,22 @@
 	TEXT_INFO_FILEPATH = 1 << 4
 } TextInfo;
 
+typedef enum {
+	PAPER_UNIT_POINTS = 0,
+	PAPER_UNIT_MM,
+	PAPER_UNIT_CM,
+	PAPER_UNIT_INCH,
+	PAPER_UNIT_PICAS,
+	PAPER_UNIT_COUNT
+} PaperUnits;
+
+typedef enum {
+	PAPER_ORIENTATION_PORTRAIT = 0,
+	PAPER_ORIENTATION_LANDSCAPE,
+	PAPER_ORIENTATION_COUNT
+} PaperOrientation;
+
+
 typedef struct _PrintWindow PrintWindow;
 struct _PrintWindow
 {
@@ -237,11 +253,11 @@
 	GtkWidget *margin_top_spin;
 	GtkWidget *margin_bottom_spin;
 
-	gint paper_units;
+	PaperUnits paper_units;
 	gint paper_size;
 	gdouble paper_width;
 	gdouble paper_height;
-	gint paper_orientation;
+	PaperOrientation paper_orientation;
 
 	gdouble margin_left;
 	gdouble margin_right;
@@ -329,21 +345,6 @@
  */
 
 
-typedef enum {
-	PAPER_UNIT_POINTS = 0,
-	PAPER_UNIT_MM,
-	PAPER_UNIT_CM,
-	PAPER_UNIT_INCH,
-	PAPER_UNIT_PICAS,
-	PAPER_UNIT_COUNT
-} PaperUnits;
-
-typedef enum {
-	PAPER_ORIENTATION_PORTRAIT = 0,
-	PAPER_ORIENTATION_LANDSCAPE,
-	PAPER_ORIENTATION_COUNT
-} PaperOrientation;
-
 typedef struct _PaperSize PaperSize;
 struct _PaperSize {
 	gchar *description;
--- a/src/slideshow.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/slideshow.c	Thu May 22 13:00:45 2008 +0000
@@ -55,7 +55,7 @@
 		}
 	else
 		{
-		gint i;
+		guint i;
 		for (i = 0; i < ss->slide_count; i++)
 			{
 			list = g_list_prepend(list, GINT_TO_POINTER(i));
@@ -365,7 +365,7 @@
 		if (ss->slide_count < 2)
 			{
 			ss->slide_count = layout_list_count(ss->layout, NULL);
-			if (!options->slideshow.random && start_point >= 0 && start_point < ss->slide_count)
+			if (!options->slideshow.random && start_point >= 0 && (guint) start_point < ss->slide_count)
 				{
 				start_index = start_point;
 				}
--- a/src/typedefs.h	Thu May 22 11:28:35 2008 +0000
+++ b/src/typedefs.h	Thu May 22 13:00:45 2008 +0000
@@ -238,7 +238,7 @@
 {
 	FileData *fd;
 	GdkPixbuf *pixbuf;
-	gint flag_mask;
+	guint flag_mask;
 };
 
 struct _CollectionData
@@ -684,7 +684,7 @@
 
 	FileData *slide_fd;
 
-	gint slide_count;
+	guint slide_count;
 	gint timeout_id;
 
 	gint from_selection;
--- a/src/ui_bookmark.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/ui_bookmark.c	Thu May 22 13:00:45 2008 +0000
@@ -268,7 +268,7 @@
 	if (max == -1) max = HISTORY_DEFAULT_KEY_COUNT;
 	if (max > 0)
 		{
-		while (hd->list && g_list_length(hd->list) > max)
+		while (hd->list && g_list_length(hd->list) > (guint) max)
 			{
 			GList *work = g_list_last(hd->list);
 			gchar *buf = work->data;
--- a/src/ui_spinner.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/ui_spinner.c	Thu May 22 13:00:45 2008 +0000
@@ -41,11 +41,11 @@
 struct _SpinnerData {
 	GtkWidget *image;
 	GList *list;		/* list of pixbufs */
-	gint frame;
+	guint frame;
 	gint timer_id;
 };
 
-static void spinner_set_frame(SpinnerData *sp, gint frame)
+static void spinner_set_frame(SpinnerData *sp, guint frame)
 {
 	GdkPixbuf *pb;
 
--- a/src/view_dir.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/view_dir.c	Thu May 22 13:00:45 2008 +0000
@@ -623,7 +623,7 @@
 	for (i = 0; i < VIEW_DIR_TYPES_COUNT; i++)
 		{
 		item = menu_item_add_check(submenu, _(menu_view_dir_radio_entries[i].label),
-					   (vd->type == menu_view_dir_radio_entries[i].value),
+					   ((gint) vd->type == menu_view_dir_radio_entries[i].value),
 					   G_CALLBACK(vd_pop_submenu_dir_view_as_cb), vd);
 		g_object_set_data(G_OBJECT(item), VIEW_DIR_AS_SUBMENU_KEY, GINT_TO_POINTER(menu_view_dir_radio_entries[i].value));
 		}
--- a/src/view_file.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/view_file.c	Thu May 22 13:00:45 2008 +0000
@@ -79,9 +79,9 @@
 	return index;
 }
 
-gint vf_count(ViewFile *vf, gint64 *bytes)
+guint vf_count(ViewFile *vf, gint64 *bytes)
 {
-	gint count = 0;
+	guint count = 0;
 
 	switch(vf->type)
 	{
@@ -167,9 +167,9 @@
  *-----------------------------------------------------------------------------
  */
 
-gint vf_selection_count(ViewFile *vf, gint64 *bytes)
+guint vf_selection_count(ViewFile *vf, gint64 *bytes)
 {
-	gint count = 0;
+	guint count = 0;
 
 	switch(vf->type)
 	{
--- a/src/view_file.h	Thu May 22 11:28:35 2008 +0000
+++ b/src/view_file.h	Thu May 22 13:00:45 2008 +0000
@@ -42,11 +42,11 @@
 FileData *vf_index_get_data(ViewFile *vf, gint row);
 gint vf_index_by_path(ViewFile *vf, const gchar *path);
 gint vf_index_by_fd(ViewFile *vf, FileData *in_fd);
-gint vf_count(ViewFile *vf, gint64 *bytes);
+guint vf_count(ViewFile *vf, gint64 *bytes);
 GList *vf_get_list(ViewFile *vf);
 
 gint vf_index_is_selected(ViewFile *vf, gint row);
-gint vf_selection_count(ViewFile *vf, gint64 *bytes);
+guint vf_selection_count(ViewFile *vf, gint64 *bytes);
 GList *vf_selection_get_list(ViewFile *vf);
 GList *vf_selection_get_list_by_index(ViewFile *vf);
 
--- a/src/view_file_icon.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/view_file_icon.c	Thu May 22 13:00:45 2008 +0000
@@ -247,7 +247,7 @@
 
 		row = g_list_index(vf->list, id);
 		if (row > vficon_index_by_fd(vf, cur_fd) &&
-		    row + 1 < vf_count(vf, NULL))
+		    (guint) (row + 1) < vf_count(vf, NULL))
 			{
 			read_ahead_fd = vf_index_get_data(vf, row + 1);
 			}
@@ -809,7 +809,7 @@
 	return (id->selected & SELECTION_SELECTED);
 }
 
-gint vficon_selection_count(ViewFile *vf, gint64 *bytes)
+guint vficon_selection_count(ViewFile *vf, gint64 *bytes)
 {
 	if (bytes)
 		{
@@ -1970,7 +1970,7 @@
 	return -1;
 }
 
-gint vficon_count(ViewFile *vf, gint64 *bytes)
+guint vficon_count(ViewFile *vf, gint64 *bytes)
 {
 	if (bytes)
 		{
--- a/src/view_file_icon.h	Thu May 22 11:28:35 2008 +0000
+++ b/src/view_file_icon.h	Thu May 22 13:00:45 2008 +0000
@@ -37,11 +37,11 @@
 FileData *vficon_index_get_data(ViewFile *vf, gint row);
 gint vficon_index_by_path(ViewFile *vf, const gchar *path);
 gint vficon_index_by_fd(ViewFile *vf, FileData *in_fd);
-gint vficon_count(ViewFile *vf, gint64 *bytes);
+guint vficon_count(ViewFile *vf, gint64 *bytes);
 GList *vficon_get_list(ViewFile *vf);
 
 gint vficon_index_is_selected(ViewFile *vf, gint row);
-gint vficon_selection_count(ViewFile *vf, gint64 *bytes);
+guint vficon_selection_count(ViewFile *vf, gint64 *bytes);
 GList *vficon_selection_get_list(ViewFile *vf);
 GList *vficon_selection_get_list_by_index(ViewFile *vf);
 
--- a/src/view_file_list.c	Thu May 22 11:28:35 2008 +0000
+++ b/src/view_file_list.c	Thu May 22 13:00:45 2008 +0000
@@ -232,7 +232,7 @@
 	if (VFLIST_INFO(vf, thumbs_enabled) &&
 	    VFLIST_INFO(vf, click_fd) && VFLIST_INFO(vf, click_fd)->pixbuf)
 		{
-		gint items;
+		guint items;
 
 		if (vflist_row_is_selected(vf, VFLIST_INFO(vf, click_fd)))
 			items = vf_selection_count(vf, NULL);
@@ -629,7 +629,7 @@
 	if (sel_fd && options->image.enable_read_ahead && row >= 0)
 		{
 		if (row > g_list_index(vf->list, cur_fd) &&
-		    row + 1 < vf_count(vf, NULL))
+		    (guint) (row + 1) < vf_count(vf, NULL))
 			{
 			read_ahead_fd = vf_index_get_data(vf, row + 1);
 			}
@@ -1064,7 +1064,7 @@
 	return -1;
 }
 
-gint vflist_count(ViewFile *vf, gint64 *bytes)
+guint vflist_count(ViewFile *vf, gint64 *bytes)
 {
 	if (bytes)
 		{
@@ -1144,12 +1144,12 @@
 	return vflist_row_is_selected(vf, fd);
 }
 
-gint vflist_selection_count(ViewFile *vf, gint64 *bytes)
+guint vflist_selection_count(ViewFile *vf, gint64 *bytes)
 {
 	GtkTreeModel *store;
 	GtkTreeSelection *selection;
 	GList *slist;
-	gint count;
+	guint count;
 
 	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(vf->listview));
 	slist = gtk_tree_selection_get_selected_rows(selection, &store);
--- a/src/view_file_list.h	Thu May 22 11:28:35 2008 +0000
+++ b/src/view_file_list.h	Thu May 22 13:00:45 2008 +0000
@@ -41,11 +41,11 @@
 
 FileData *vflist_index_get_data(ViewFile *vf, gint row);
 gint vflist_index_by_path(ViewFile *vf, const gchar *path);
-gint vflist_count(ViewFile *vf, gint64 *bytes);
+guint vflist_count(ViewFile *vf, gint64 *bytes);
 GList *vflist_get_list(ViewFile *vf);
 
 gint vflist_index_is_selected(ViewFile *vf, gint row);
-gint vflist_selection_count(ViewFile *vf, gint64 *bytes);
+guint vflist_selection_count(ViewFile *vf, gint64 *bytes);
 GList *vflist_selection_get_list(ViewFile *vf);
 GList *vflist_selection_get_list_by_index(ViewFile *vf);