isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 61d98c5a1defdcce45dde75053c3a5bd3494383e
parent 4afd31a45755d8321f4e913b8092076d01c16335
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat,  7 Jul 2012 17:19:17 +0200

fix a bunch of warnings

Diffstat:
Msrc/compat/convert.c | 4++--
Msrc/drv_imap.c | 2+-
Msrc/drv_maildir.c | 2+-
Msrc/sync.c | 6+++---
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git 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 @@ -324,7 +324,7 @@ static int init_ssl_ctx( imap_store_t *ctx ) { imap_server_conf_t *srvc = ((imap_store_conf_t *)ctx->gen.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 @@ -661,7 +661,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 @@ -963,7 +963,7 @@ msgs_found_sel( sync_vars_t *svars, int t ) copy_vars_t *cv; flag_vars_t *fv; const char *diag; - int uid, minwuid, *mexcs, nmexcs, rmexcs, no[2], del[2], todel, nmsgs, t1, t2; + int uid, minwuid, *mexcs, nmexcs, rmexcs, no[2], del[2], todel, t1, t2; int sflags, nflags, aflags, dflags, nex; char fbuf[16]; /* enlarge when support for keywords is added */ @@ -981,7 +981,7 @@ msgs_found_sel( sync_vars_t *svars, int t ) uid = tmsg->uid; if (DFlags & DEBUG) { make_flags( tmsg->flags, fbuf ); - printf( svars->ctx[t]->opts & OPEN_SIZE ? " message %5d, %-4s, %6d: " : " message %5d, %-4s: ", uid, fbuf, tmsg->size ); + printf( svars->ctx[t]->opts & OPEN_SIZE ? " message %5d, %-4s, %6lu: " : " message %5d, %-4s: ", uid, fbuf, tmsg->size ); } for (srec = nsrec; srec; srec = srec->next) { if (srec->status & S_DEAD) @@ -1081,7 +1081,7 @@ msgs_found_sel( sync_vars_t *svars, int t ) debug( "synchronizing new entries\n" ); svars->osrecadd = svars->srecadd; for (t = 0; t < 2; t++) { - for (nmsgs = 0, tmsg = svars->ctx[1-t]->msgs; tmsg; tmsg = tmsg->next) + for (tmsg = svars->ctx[1-t]->msgs; tmsg; tmsg = tmsg->next) if (tmsg->srec ? tmsg->srec->uid[t] < 0 && (tmsg->srec->uid[t] == -1 ? (svars->chan->ops[t] & OP_RENEW) : (svars->chan->ops[t] & OP_NEW)) : (svars->chan->ops[t] & OP_NEW)) { debug( "new message %d on %s\n", tmsg->uid, str_ms[1-t] ); if ((svars->chan->ops[t] & OP_EXPUNGE) && (tmsg->flags & F_DELETED))