# HG changeset patch # User zas_ # Date 1211455663 0 # Node ID e6ebae313d4679f7cdc227b4a810f7875bc78a55 # Parent 57f759d012c7ac2512778e8e0a725bb30f5b2cdd Fix up some types, make some signed vs unsigned warnings quiet. diff -r 57f759d012c7 -r e6ebae313d46 src/bar_info.c --- a/src/bar_info.c Thu May 22 10:09:07 2008 +0000 +++ b/src/bar_info.c Thu May 22 11:27:43 2008 +0000 @@ -300,7 +300,7 @@ if (keywords) { ExifItem *item; - gint i; + guint i; *keywords = NULL; item = exif_get_item(exif, KEYWORD_KEY); diff -r 57f759d012c7 -r e6ebae313d46 src/cache.c --- a/src/cache.c Thu May 22 10:09:07 2008 +0000 +++ b/src/cache.c Thu May 22 11:27:43 2008 +0000 @@ -185,13 +185,13 @@ *------------------------------------------------------------------- */ -static gint cache_sim_read_skipline(FILE *f, int s) +static gint cache_sim_read_skipline(FILE *f, gint s) { if (!f) return FALSE; if (fseek(f, 0 - s, SEEK_CUR) == 0) { - char b; + gchar b; while (fread(&b, sizeof(b), 1, f) == 1) { if (b == '\n') return TRUE; @@ -202,7 +202,7 @@ return FALSE; } -static gint cache_sim_read_comment(FILE *f, char *buf, int s, CacheData *cd) +static gint cache_sim_read_comment(FILE *f, gchar *buf, gint s, CacheData *cd) { if (!f || !buf || !cd) return FALSE; @@ -211,7 +211,7 @@ return cache_sim_read_skipline(f, s - 1); } -static gint cache_sim_read_dimensions(FILE *f, char *buf, int s, CacheData *cd) +static gint cache_sim_read_dimensions(FILE *f, gchar *buf, gint s, CacheData *cd) { if (!f || !buf || !cd) return FALSE; @@ -219,9 +219,9 @@ if (fseek(f, - s, SEEK_CUR) == 0) { - char b; - char buf[1024]; - gint p = 0; + gchar b; + gchar buf[1024]; + gsize p = 0; gint w, h; b = 'X'; @@ -254,7 +254,7 @@ return FALSE; } -static gint cache_sim_read_date(FILE *f, char *buf, int s, CacheData *cd) +static gint cache_sim_read_date(FILE *f, gchar *buf, gint s, CacheData *cd) { if (!f || !buf || !cd) return FALSE; @@ -262,9 +262,9 @@ if (fseek(f, - s, SEEK_CUR) == 0) { - char b; - char buf[1024]; - gint p = 0; + gchar b; + gchar buf[1024]; + gsize p = 0; b = 'X'; while (b != '[') @@ -294,7 +294,7 @@ return FALSE; } -static gint cache_sim_read_checksum(FILE *f, char *buf, int s, CacheData *cd) +static gint cache_sim_read_checksum(FILE *f, gchar *buf, gint s, CacheData *cd) { if (!f || !buf || !cd) return FALSE; @@ -302,9 +302,9 @@ if (fseek(f, - s, SEEK_CUR) == 0) { - char b; - char buf[1024]; - gint p = 0; + gchar b; + gchar buf[1024]; + gsize p = 0; b = 'X'; while (b != '[') @@ -334,7 +334,7 @@ return FALSE; } -static gint cache_sim_read_md5sum(FILE *f, char *buf, int s, CacheData *cd) +static gint cache_sim_read_md5sum(FILE *f, gchar *buf, gint s, CacheData *cd) { if (!f || !buf || !cd) return FALSE; @@ -342,9 +342,9 @@ if (fseek(f, - s, SEEK_CUR) == 0) { - char b; - char buf[64]; - gint p = 0; + gchar b; + gchar buf[64]; + gsize p = 0; b = 'X'; while (b != '[') @@ -371,7 +371,7 @@ return FALSE; } -static gint cache_sim_read_similarity(FILE *f, char *buf, int s, CacheData *cd) +static gint cache_sim_read_similarity(FILE *f, gchar *buf, gint s, CacheData *cd) { if (!f || !buf || !cd) return FALSE; @@ -381,7 +381,7 @@ if (fseek(f, - s, SEEK_CUR) == 0) { - char b; + gchar b; guint8 pixel_buf[3]; ImageSimilarityData *sd; gint x, y; @@ -441,7 +441,7 @@ { FILE *f; CacheData *cd = NULL; - char buf[32]; + gchar buf[32]; gint success = CACHE_LOAD_LINE_NOISE; gchar *pathl; @@ -456,7 +456,7 @@ cd = cache_sim_data_new(); cd->path = g_strdup(path); - if (fread(&buf, sizeof(char), 9, f) != 9 || + if (fread(&buf, sizeof(gchar), 9, f) != 9 || strncmp(buf, "SIMcache", 8) != 0) { DEBUG_1("%s is not a cache file", cd->path); @@ -465,8 +465,8 @@ while (success > 0) { - int s; - s = fread(&buf, sizeof(char), sizeof(buf), f); + gint s; + s = fread(&buf, sizeof(gchar), sizeof(buf), f); if (s < 1) { diff -r 57f759d012c7 -r e6ebae313d46 src/cache_maint.c --- a/src/cache_maint.c Thu May 22 10:09:07 2008 +0000 +++ b/src/cache_maint.c Thu May 22 11:27:43 2008 +0000 @@ -136,9 +136,9 @@ GList *dlist = NULL; GList *list = NULL; FileData *fd; - gint just_done = FALSE; - gint still_have_a_file = TRUE; - gint base_length; + gboolean just_done = FALSE; + gboolean still_have_a_file = TRUE; + gsize base_length; const gchar *cache_folder; gchar *base; diff -r 57f759d012c7 -r e6ebae313d46 src/ui_tabcomp.c --- a/src/ui_tabcomp.c Thu May 22 10:09:07 2008 +0000 +++ b/src/ui_tabcomp.c Thu May 22 11:27:43 2008 +0000 @@ -491,7 +491,7 @@ } else { - gint c = strlen(entry_file); + gsize c = strlen(entry_file); gint done = FALSE; gchar *test_file = poss->data;