From: David Champion Date: Mon, 19 Jul 2004 21:41:43 +0000 (+0000) Subject: Fix some compiler warnings. X-Git-Tag: mutt-1-5-15-rel~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=853c19b227d473cbaeebb876d6d3124502a3a10b;p=mutt Fix some compiler warnings. --- diff --git a/mbox.c b/mbox.c index e3f40af2..6ecd7daa 100644 --- a/mbox.c +++ b/mbox.c @@ -924,8 +924,8 @@ int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint) char savefile[_POSIX_PATH_MAX]; - snprintf (savefile, sizeof (savefile), "%s/mutt.%s-%s-%d", - NONULL (Tempdir), NONULL(Username), NONULL(Hostname), getpid ()); + snprintf (savefile, sizeof (savefile), "%s/mutt.%s-%s-%u", + NONULL (Tempdir), NONULL(Username), NONULL(Hostname), (unsigned int)getpid ()); rename (tempfile, savefile); mutt_unblock_signals (); mx_fastclose_mailbox (ctx); diff --git a/mh.c b/mh.c index 751cd1a9..17dbafc6 100644 --- a/mh.c +++ b/mh.c @@ -933,9 +933,9 @@ int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr) FOREVER { - snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%d_%d.%s%s", - dest->path, subdir, time (NULL), getpid (), Counter++, - NONULL (Hostname), suffix); + snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s", + dest->path, subdir, time (NULL), (unsigned int)getpid (), + Counter++, NONULL (Hostname), suffix); dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n", path)); @@ -1014,8 +1014,9 @@ int maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr) /* construct a new file name. */ FOREVER { - snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%d_%d.%s%s", subdir, - time (NULL), getpid (), Counter++, NONULL (Hostname), suffix); + snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir, + time (NULL), (unsigned int)getpid (), Counter++, + NONULL (Hostname), suffix); snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path); dprint (2, (debugfile, "maildir_commit_message (): renaming %s to %s.\n", diff --git a/pgp.c b/pgp.c index 99a569ac..ee68eef8 100644 --- a/pgp.c +++ b/pgp.c @@ -244,7 +244,9 @@ void pgp_application_pgp_handler (BODY *m, STATE *s) char body_charset[STRING]; mutt_get_body_charset (body_charset, sizeof (body_charset), m); - + + rc = 0; /* silence false compiler warning if (s->flags & M_DISPLAY) */ + fseek (s->fpin, m->offset, 0); last_pos = m->offset; diff --git a/sendlib.c b/sendlib.c index f273e26f..cfc63b85 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1770,9 +1770,9 @@ char *mutt_gen_msgid (void) if(!(fqdn = mutt_fqdn(0))) fqdn = NONULL(Hostname); - snprintf (buf, sizeof (buf), "<%d%02d%02d%02d%02d%02d.G%c%d@%s>", + snprintf (buf, sizeof (buf), "<%d%02d%02d%02d%02d%02d.G%c%u@%s>", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, - tm->tm_min, tm->tm_sec, MsgIdPfx, getpid (), fqdn); + tm->tm_min, tm->tm_sec, MsgIdPfx, (unsigned int)getpid (), fqdn); MsgIdPfx = (MsgIdPfx == 'Z') ? 'A' : MsgIdPfx + 1; return (safe_strdup (buf)); }