Fix compilation warnings.
authorLaurent Monin <geeqie@norz.org>
Thu, 20 Nov 2008 11:46:43 +0000 (11:46 +0000)
committerLaurent Monin <geeqie@norz.org>
Thu, 20 Nov 2008 11:46:43 +0000 (11:46 +0000)
src/exif-common.c
src/filecache.c
src/print.c
src/ui_fileops.c
src/ui_fileops.h
src/view_file_icon.c
src/view_file_list.c

index 3af62ca..c7c9e6b 100644 (file)
@@ -456,7 +456,7 @@ static gchar *exif_build_formatted_GPSPosition(ExifData *exif)
                p2 = (gint)((p - p1)*60);
                p3 = ((p - p1)*60 - p2)*60;
 
-               g_string_append_printf(string, "%0d° %0d' %0.2f\" %.1s", p1, p2, p3, ref);
+               g_string_append_printf(string, "%0lu° %0lu' %0.2f\" %.1s", p1, p2, p3, ref);
                } // if (item && ref)
 
        item = exif_get_item(exif, "Exif.GPSInfo.GPSLongitude");
@@ -474,7 +474,7 @@ static gchar *exif_build_formatted_GPSPosition(ExifData *exif)
                p2 = (gint)((p - p1)*60);
                p3 = ((p - p1)*60 - p2)*60;
 
-               g_string_append_printf(string, ", %0d° %0d' %0.2f\" %.1s", p1, p2, p3, ref);
+               g_string_append_printf(string, ", %0lu° %0lu' %0.2f\" %.1s", p1, p2, p3, ref);
                } // if (item && ref)
 
        text = string->str;
index 4abb240..becca89 100644 (file)
@@ -165,7 +165,7 @@ void file_cache_dump(FileCacheData *fc)
 {
        GList *work;
        work = fc->list;
-       guint n = 0;
+       gulong n = 0;
        DEBUG_1("cache dump: fc=%p max size:%ld size:%ld", fc, fc->max_size, fc->size);
                
        while (work)
index f562479..d434820 100644 (file)
@@ -1223,7 +1223,7 @@ static void print_job_ps_page_image_pixel(FILE *f, guchar *pix)
                }
        text[6] = '\0';
 
-       fprintf(f, text);
+       fprintf(f, "%s", text);
 }
 static gint print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
                                    gdouble x, gdouble y, gdouble w, gdouble h,
@@ -1348,7 +1348,7 @@ static const gchar *ps_text_to_hex_array(FILE *f, const gchar *text, gdouble x,
                text[1] = hex_digits[*p & 0xf];
                text[2] = '\0';
 
-               fprintf(f, text);
+               fprintf(f, "%s", text);
 
                p++;
                }
index d1c04db..8d8c0b2 100644 (file)
@@ -829,7 +829,7 @@ gint file_in_path(const gchar *name)
        return ret;
 }
 
-gboolean recursive_mkdir_if_not_exists(gchar *path, mode_t mode)
+gboolean recursive_mkdir_if_not_exists(const gchar *path, mode_t mode)
 {
        if (!path) return FALSE;
 
index 7ff563a..3ddbc99 100644 (file)
@@ -84,7 +84,7 @@ void parse_out_relatives(gchar *path);
 
 gint file_in_path(const gchar *name);
 
-gboolean recursive_mkdir_if_not_exists(gchar *path, mode_t mode);
+gboolean recursive_mkdir_if_not_exists(const gchar *path, mode_t mode);
 
 #endif
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index 40edad7..3ac6d3b 100644 (file)
@@ -544,7 +544,7 @@ static void vficon_dnd_get(GtkWidget *widget, GdkDragContext *context,
        uri_text = uri_text_from_filelist(list, &total, (info == TARGET_TEXT_PLAIN));
        filelist_free(list);
 
-       DEBUG_1(uri_text);
+       DEBUG_1("%s", uri_text);
 
        gtk_selection_data_set(selection_data, selection_data->target,
                               8, (guchar *)uri_text, total);
index 42886fc..1b9171c 100644 (file)
@@ -246,7 +246,7 @@ static void vflist_dnd_get(GtkWidget *widget, GdkDragContext *context,
        uri_text = uri_text_from_filelist(list, &total, (info == TARGET_TEXT_PLAIN));
        filelist_free(list);
 
-       DEBUG_1(uri_text);
+       DEBUG_1("%s", uri_text);
 
        gtk_selection_data_set(selection_data, selection_data->target,
                               8, (guchar *)uri_text, total);