]> granicus.if.org Git - mutt/commitdiff
Fix some compiler warnings.
authorDavid Champion <dgc@bikeshed.us>
Mon, 19 Jul 2004 21:41:43 +0000 (21:41 +0000)
committerDavid Champion <dgc@bikeshed.us>
Mon, 19 Jul 2004 21:41:43 +0000 (21:41 +0000)
mbox.c
mh.c
pgp.c
sendlib.c

diff --git a/mbox.c b/mbox.c
index e3f40af2498176d144c8a6697883729c64e3490d..6ecd7daac0bf7f481c78981a5ddb003d26931b27 100644 (file)
--- 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 751cd1a97d1fe4e4d585866a598d9284344b3306..17dbafc6a7ca707dda34144f1c2e67bb433a9f2b 100644 (file)
--- 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 99a569ac9b31901ad46ea6a8c01ea79d1b8f2f18..ee68eef87bbdcb4b8c72126c7a81beb74bfc0b50 100644 (file)
--- 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;
   
index f273e26f6106ad796889699799a0e244be0353d3..cfc63b85a2ed6a4f6100aa8a71d2d623d1334c58 100644 (file)
--- 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));
 }