commit 9600c22bfb4b064281adc212c01f4586e56339e2 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>. 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 4807e75..629da10 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -1155,7 +1155,7 @@ maildir_store_msg( store_t *gctx, msg_data_t *data, int to_trash, int ret, fd, bl, uid; 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 (!to_trash) { #ifdef USE_DB if (ctx->db) { @@ -1325,7 +1325,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/%ld.%d_%d.%s%s", ctx->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