commit a4ff7d4dafdb1741095cac3d37479fc771675ec6 Author: Oswald Buddenhagen <o...@kde.org> Date: Sat Mar 23 15:07:47 2013 +0100
downcast time_t to long for printing time_t may be long long. to keep the sprintf format strings simple, just downcast - this is not going to be a problem for the next 30 years, and until then long will be 64-bit everywhere anyway. suggested 3.5 years ago by Antoine Reilles <to...@netbsd.org>. (cherry picked from commit 9600c22bfb4b064281adc212c01f4586e56339e2) Conflicts: src/drv_maildir.c src/drv_maildir.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drv_maildir.c b/src/drv_maildir.c index 4383ec2..35ddceb 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -936,7 +936,7 @@ maildir_store_msg( store_t *gctx, msg_data_t *data, int *uid ) int ret, fd, bl; char buf[_POSIX_PATH_MAX], nbuf[_POSIX_PATH_MAX], fbuf[NUM_FLAGS + 3], base[128]; - bl = nfsnprintf( base, sizeof(base), "%ld.%d_%d.%s", time( 0 ), Pid, ++MaildirCount, Hostname ); + bl = nfsnprintf( base, sizeof(base), "%ld.%d_%d.%s", (long)time( 0 ), Pid, ++MaildirCount, Hostname ); if (uid) { #ifdef USE_DB if (ctx->db) { @@ -1087,7 +1087,7 @@ maildir_trash_msg( store_t *gctx, message_t *gmsg ) nfsnprintf( buf, sizeof(buf), "%s/%s/%s", gctx->path, subdirs[gmsg->status & M_RECENT], msg->base ); s = strstr( msg->base, ":2," ); nfsnprintf( nbuf, sizeof(nbuf), "%s%s/%s/%ld.%d_%d.%s%s", gctx->conf->path, gctx->conf->trash, - subdirs[gmsg->status & M_RECENT], time( 0 ), Pid, ++MaildirCount, Hostname, s ? s : "" ); + subdirs[gmsg->status & M_RECENT], (long)time( 0 ), Pid, ++MaildirCount, Hostname, s ? s : "" ); if (!rename( buf, nbuf )) break; if (!stat( buf, &st )) { ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel