From 4dc7e17f3e06604a4082335c60e1f1101b4d9c7a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 7 Jul 2012 17:19:17 +0200 Subject: [PATCH] fix a bunch of warnings (cherry picked from commit 61d98c5a1defdcce45dde75053c3a5bd3494383e) Conflicts: src/drv_imap.c src/sync.c --- src/compat/convert.c | 4 ++-- src/drv_imap.c | 2 +- src/drv_maildir.c | 2 +- src/sync.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compat/convert.c b/src/compat/convert.c index 0ed1ba2..e70d2f8 100644 --- a/src/compat/convert.c +++ b/src/compat/convert.c @@ -73,7 +73,7 @@ convert( config_t *box ) FILE *fp; msg_t *msgs; DB *db; - int i, ret, fd, uidval, maxuid, bl, uid, rmsgs, nmsgs, uv[2]; + int i, ret, fd, uidval, maxuid, uid, rmsgs, nmsgs, uv[2]; unsigned u; struct stat sb; char buf[_POSIX_PATH_MAX], diumname[_POSIX_PATH_MAX], @@ -160,7 +160,7 @@ convert( config_t *box ) rmsgs = 0; nmsgs = 0; for (i = 0; i < 2; i++) { - bl = nfsnprintf( buf, sizeof(buf), "%s/%s/", mboxdir, subdirs[i] ); + nfsnprintf( buf, sizeof(buf), "%s/%s/", mboxdir, subdirs[i] ); if (!(d = opendir( buf ))) { perror( "opendir" ); err4: diff --git a/src/drv_imap.c b/src/drv_imap.c index 573f601..4c27bcf 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -303,7 +303,7 @@ init_ssl_ctx( imap_store_t *ctx ) imap_t *imap = ctx->imap; imap_store_conf_t *conf = (imap_store_conf_t *)ctx->gen.conf; imap_server_conf_t *srvc = conf->server; - SSL_METHOD *method; + const SSL_METHOD *method; int options = 0; if (srvc->use_tlsv1 && !srvc->use_sslv2 && !srvc->use_sslv3) diff --git a/src/drv_maildir.c b/src/drv_maildir.c index e6cf08d..4383ec2 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -641,7 +641,7 @@ maildir_scan( maildir_store_t *ctx, msglist_t *msglist ) else u = ru = strchr( entry->base, ':' ); fnl = (u ? - nfsnprintf( buf + bl, sizeof(buf) - bl, "%s/%.*s,U=%d%s", subdirs[entry->recent], u - entry->base, entry->base, uid, ru ) : + nfsnprintf( buf + bl, sizeof(buf) - bl, "%s/%.*s,U=%d%s", subdirs[entry->recent], (int)(u - entry->base), entry->base, uid, ru ) : nfsnprintf( buf + bl, sizeof(buf) - bl, "%s/%s,U=%d", subdirs[entry->recent], entry->base, uid )) + 1 - 4; memcpy( nbuf, buf, bl + 4 ); diff --git a/src/sync.c b/src/sync.c index 5a5d247..a2fe95e 100644 --- a/src/sync.c +++ b/src/sync.c @@ -119,7 +119,7 @@ dump_box( store_t *ctx ) if (Debug) for (msg = ctx->msgs; msg; msg = msg->next) { make_flags( msg->flags, fbuf ); - printf( " message %d, %s, %d\n", msg->uid, fbuf, msg->size ); + printf( " message %d, %s, %lu\n", msg->uid, fbuf, msg->size ); } }