From 67f4aeff1febc9bf750a927052c467fee15ba276 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 29 Dec 2016 14:10:35 +0100 Subject: [PATCH] standardize on 'int' for message sizes that's what the sources already assumed anyway. size_t is total overkill, as No Email Ever (TM) will exceed 2GiB. this also fixes a harmless format string warning in 32 bit builds. --- src/driver.h | 4 ++-- src/sync.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/driver.h b/src/driver.h index dcf9255..3b3ae1b 100644 --- a/src/driver.h +++ b/src/driver.h @@ -39,7 +39,7 @@ typedef struct store_conf { const char *flat_delim; const char *map_inbox; const char *trash; - uint max_size; /* off_t is overkill */ + int max_size; /* off_t is overkill */ char trash_remote_new, trash_only_new; } store_conf_t; @@ -64,7 +64,7 @@ typedef struct message { struct message *next; struct sync_rec *srec; /* string_list_t *keywords; */ - size_t size; /* zero implies "not fetched" */ + int size; /* zero implies "not fetched" */ int uid; uchar flags, status; char tuid[TUIDL]; diff --git a/src/sync.c b/src/sync.c index 4fb2026..835547a 100644 --- a/src/sync.c +++ b/src/sync.c @@ -1369,7 +1369,7 @@ box_loaded( int sts, void *aux ) uid = tmsg->uid; if (DFlags & DEBUG_SYNC) { make_flags( tmsg->flags, fbuf ); - printf( svars->ctx[t]->opts & OPEN_SIZE ? " message %5d, %-4s, %6lu: " : " message %5d, %-4s: ", uid, fbuf, tmsg->size ); + printf( svars->ctx[t]->opts & OPEN_SIZE ? " message %5d, %-4s, %6d: " : " message %5d, %-4s: ", uid, fbuf, tmsg->size ); } idx = (uint)((uint)uid * 1103515245U) % hashsz; while (srecmap[idx].uid) {