commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. rel-2_1-17-ga600395


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. rel-2_1-17-ga600395
Date: Wed, 16 Dec 2009 11:05:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=a600395e1fe66e0a116827f17f9bd864d4554585

The branch, master has been updated
       via  a600395e1fe66e0a116827f17f9bd864d4554585 (commit)
      from  96dc9ab99e9518f5f21a7710e396da8c3fd833b5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a600395e1fe66e0a116827f17f9bd864d4554585
Author: Sergey Poznyakoff <address@hidden>
Date:   Wed Dec 16 13:06:22 2009 +0200

    Fix format specifiers and usage of const char* arguments/variables.
    
    Affected files:
    
    * comsat/comsat.c
    * examples/header.c
    * examples/mailcap.c
    * examples/pop3client.c
    * examples/url-parse.c
    * imap4d/fetch.c
    * imap4d/id.c
    * imap4d/list.c
    * imap4d/select.c
    * imap4d/status.c
    * imap4d/store.c
    * imap4d/sync.c
    * imap4d/util.c
    * include/mailutils/sieve.h
    * libmu_argp/common.c
    * libmu_argp/muinit.c
    * libmu_sieve/actions.c
    * libmu_sieve/extensions/pipe.c
    * libmu_sieve/extensions/vacation.c
    * libmu_sieve/prog.c
    * libmu_sieve/require.c
    * libmu_sieve/runtime.c
    * libmu_sieve/sieve-priv.h
    * libmu_sieve/sieve.y
    * libproto/imap/folder.c
    * libproto/imap/mbox.c
    * libproto/mailer/sendmail.c
    * libproto/mbox/mbox.c
    * libproto/pop/pop3_list.c
    * libproto/pop/pop3_stat.c
    * maidag/lmtp.c
    * maidag/sieve.c
    * mail/copy.c
    * mail/decode.c
    * mail/envelope.c
    * mail/eq.c
    * mail/escape.c
    * mail/from.c
    * mail/mail.h
    * mail/mailline.c
    * mail/mailvar.c
    * mail/size.c
    * mail/util.c
    * mail/write.c
    * mailbox/cfg_format.c
    * mailbox/folder.c
    * mailbox/parse822.c
    * mailbox/system.c
    * messages/messages.c
    * mh/folder.c
    * mh/forw.c
    * mh/inc.c
    * mh/mh.h
    * mh/mh_alias.l
    * mh/mh_fmtgram.y
    * mh/mh_getopt.h
    * mh/mh_init.c
    * mh/mh_msgset.c
    * mh/mh_whatnow.c
    * mh/mhn.c
    * mh/pick.y
    * mimeview/mimetypes.y
    * python/libmu_py/debug.c
    * sieve/sieve.c

-----------------------------------------------------------------------

Summary of changes:
 comsat/comsat.c                   |    2 +-
 examples/header.c                 |    4 +-
 examples/mailcap.c                |    5 ++-
 examples/pop3client.c             |    9 +++---
 examples/url-parse.c              |    4 +-
 imap4d/fetch.c                    |    4 +-
 imap4d/id.c                       |    2 +-
 imap4d/list.c                     |    2 +-
 imap4d/select.c                   |    8 +++--
 imap4d/status.c                   |    8 +++---
 imap4d/store.c                    |    2 +-
 imap4d/sync.c                     |   12 +++++---
 imap4d/util.c                     |    2 +-
 include/mailutils/sieve.h         |    4 +-
 libmu_argp/common.c               |    1 +
 libmu_argp/muinit.c               |    4 ++-
 libmu_sieve/actions.c             |   51 +++++++++++++++++++------------------
 libmu_sieve/extensions/pipe.c     |   18 ++++++------
 libmu_sieve/extensions/vacation.c |   33 ++++++++++++-----------
 libmu_sieve/prog.c                |    6 ++--
 libmu_sieve/require.c             |    4 +-
 libmu_sieve/runtime.c             |    8 +++---
 libmu_sieve/sieve-priv.h          |    4 +-
 libmu_sieve/sieve.y               |    4 +-
 libproto/imap/folder.c            |   47 ++++++++++++++++++----------------
 libproto/imap/mbox.c              |    8 +++---
 libproto/mailer/sendmail.c        |    4 +-
 libproto/mbox/mbox.c              |    4 +-
 libproto/pop/pop3_list.c          |   10 ++++---
 libproto/pop/pop3_stat.c          |   10 ++++---
 maidag/lmtp.c                     |    2 +-
 maidag/sieve.c                    |    3 +-
 mail/copy.c                       |    3 +-
 mail/decode.c                     |    4 +-
 mail/envelope.c                   |    3 +-
 mail/eq.c                         |    6 ++--
 mail/escape.c                     |    3 +-
 mail/from.c                       |    4 +-
 mail/mail.h                       |    4 +-
 mail/mailline.c                   |    4 +-
 mail/mailvar.c                    |    7 +++--
 mail/size.c                       |    8 +++--
 mail/util.c                       |   14 +++++-----
 mail/write.c                      |    5 ++-
 mailbox/cfg_format.c              |    7 +++--
 mailbox/folder.c                  |    8 ++---
 mailbox/parse822.c                |    4 +-
 mailbox/system.c                  |    5 ++-
 messages/messages.c               |    4 +-
 mh/folder.c                       |    3 +-
 mh/forw.c                         |    8 +++---
 mh/inc.c                          |    8 +++---
 mh/mh.h                           |    2 +-
 mh/mh_alias.l                     |    7 +++--
 mh/mh_fmtgram.y                   |    4 +-
 mh/mh_getopt.h                    |    2 +-
 mh/mh_init.c                      |    3 +-
 mh/mh_msgset.c                    |    6 +++-
 mh/mh_whatnow.c                   |   12 ++++----
 mh/mhn.c                          |    4 +-
 mh/pick.y                         |    9 ++++--
 mimeview/mimetypes.y              |    4 +-
 python/libmu_py/debug.c           |    4 +-
 sieve/sieve.c                     |    3 +-
 64 files changed, 248 insertions(+), 213 deletions(-)

diff --git a/comsat/comsat.c b/comsat/comsat.c
index a6bbf03..de9c9cc 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -276,7 +276,7 @@ int
 comsat_main (int fd)
 {
   int rdlen;
-  int len;
+  socklen_t len;
   struct sockaddr fromaddr;
   char buffer[216]; /*FIXME: Arbitrary size */
 
diff --git a/examples/header.c b/examples/header.c
index 84e9454..d9b015a 100644
--- a/examples/header.c
+++ b/examples/header.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -350,7 +350,7 @@ cmd_readline (int argc, char **argv)
     abort ();
   mu_header_get_stream (header, &stream);
   mu_stream_readline (stream, buf, size, 0, &nbytes);
-  printf ("\"%*.*s\"", nbytes, nbytes, buf);
+  printf ("\"%*.*s\"", (int) nbytes, (int) nbytes, buf);
   free (buf);
 }
   
diff --git a/examples/mailcap.c b/examples/mailcap.c
index fb0a4f3..4f5c57c 100644
--- a/examples/mailcap.c
+++ b/examples/mailcap.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2004, 2007,
+   2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -90,7 +91,7 @@ main (int argc, char **argv)
                            mu_strerror (status));
                  break;
                }
-             printf ("\tfields[%d]: %s\n", j, buffer);
+             printf ("\tfields[%lu]: %s\n", (unsigned long) j, buffer);
            }
          printf ("\n");
        }
diff --git a/examples/pop3client.c b/examples/pop3client.c
index a404038..2c2199e 100644
--- a/examples/pop3client.c
+++ b/examples/pop3client.c
@@ -520,7 +520,7 @@ com_list (char *arg)
       unsigned int msgno = strtoul (arg, NULL, 10);
       status = mu_pop3_list (pop3, msgno, &size);
       if (status == 0)
-       printf ("Msg: %d Size: %d\n", msgno, size);
+       printf ("Msg: %u Size: %lu\n", msgno, (unsigned long) size);
     }
   return status;
 }
@@ -597,12 +597,13 @@ com_pass (char *arg)
 int
 com_stat (char *arg MU_ARG_UNUSED)
 {
-  unsigned count, size;
+  unsigned count = 0;
+  size_t size = 0;
   int status = 0;
 
-  count = size = 0;
   status = mu_pop3_stat (pop3, &count, &size);
-  printf ("Mesgs: %d Size %d\n", count, size);
+  printf ("Mesgs: %lu Size %lu\n",
+         (unsigned long) count, (unsigned long) size);
   return status;
 }
 
diff --git a/examples/url-parse.c b/examples/url-parse.c
index d1a35c4..efddda6 100644
--- a/examples/url-parse.c
+++ b/examples/url-parse.c
@@ -54,7 +54,7 @@ print_fvpairs (mu_url_t url)
   if (fvc == 0)
     return;
   for (i = 0; i < fvc; i++)
-    printf ("\tparam[%d] <%s>\n", i, fvp[i]);
+    printf ("\tparam[%lu] <%s>\n", (unsigned long) i, fvp[i]);
 }
 
 static void
@@ -71,7 +71,7 @@ print_query (mu_url_t url)
   if (qargc == 0)
     return;
   for (i = 0; i < qargc; i++)
-    printf ("\tquery[%d] <%s>\n", i, qargv[i]);
+    printf ("\tquery[%lu] <%s>\n", (unsigned long) i, qargv[i]);
 }
 
 int
diff --git a/imap4d/fetch.c b/imap4d/fetch.c
index 16caf33..faca25e 100644
--- a/imap4d/fetch.c
+++ b/imap4d/fetch.c
@@ -930,7 +930,7 @@ _frt_size (struct fetch_function_closure *ffc,
   
   mu_message_size (frt->msg, &size);
   mu_message_lines (frt->msg, &lines);
-  util_send ("%s %u", ffc->name, size + lines);
+  util_send ("%s %lu", ffc->name, (unsigned long) (size + lines));
   return RESP_OK;
 }
 
@@ -1312,7 +1312,7 @@ static size_t
 parsebuf_get_number (imap4d_parsebuf_t p)
 {
   char *cp;
-  unsigned n = strtoul (p->token, &cp, 10);
+  unsigned long n = strtoul (p->token, &cp, 10);
 
   if (*cp)
     imap4d_parsebuf_exit (p, "Syntax error: expected number");
diff --git a/imap4d/id.c b/imap4d/id.c
index 201f9bd..4715baa 100644
--- a/imap4d/id.c
+++ b/imap4d/id.c
@@ -197,7 +197,7 @@ imap4d_id (struct imap4d_command *command, imap4d_tokbuf_t 
tok)
                util_send ("* ID (");
              else
                util_send (" ");
-             util_send ("\"%*.*s\" \"%s\"", len, len, p, q);
+             util_send ("\"%*.*s\" \"%s\"", (int) len, (int) len, p, q);
            }
        }
       mu_iterator_destroy (&itr);
diff --git a/imap4d/list.c b/imap4d/list.c
index f7049b4..ecb54f2 100644
--- a/imap4d/list.c
+++ b/imap4d/list.c
@@ -97,7 +97,7 @@ list_fun (mu_folder_t folder, struct mu_list_response *resp, 
void *data)
   name = refinfo->buf;
   
   if (strpbrk (name, "\"{}"))
-    util_send ("{%d}\r\n%s\r\n", strlen (name), name);
+    util_send ("{%lu}\r\n%s\r\n", (unsigned long) strlen (name), name);
   else if (is_atom (name))
     util_send ("%s\r\n", name);
   else
diff --git a/imap4d/select.c b/imap4d/select.c
index 0a7f39d..6b4949d 100644
--- a/imap4d/select.c
+++ b/imap4d/select.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2001, 2003, 2005, 2006,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -110,9 +110,11 @@ imap4d_select_status ()
   /* This outputs EXISTS and RECENT responses */
   imap4d_sync();
   util_out (RESP_OK, "[UIDVALIDITY %lu] UID valididy status", uidvalidity);
-  util_out (RESP_OK, "[UIDNEXT %d] Predicted next uid", uidnext);
+  util_out (RESP_OK, "[UIDNEXT %lu] Predicted next uid",
+           (unsigned long) uidnext);
   if (unseen)
-    util_out (RESP_OK, "[UNSEEN %d] first unseen messsage ", unseen);
+    util_out (RESP_OK, "[UNSEEN %lu] first unseen messsage ",
+             (unsigned long) unseen);
   util_out (RESP_NONE, "FLAGS (%s)", mflags);
   /* FIXME:
      - '\*' can be supported if we use the attribute_set userflag()
diff --git a/imap4d/status.c b/imap4d/status.c
index 2f1c0b1..6568c65 100644
--- a/imap4d/status.c
+++ b/imap4d/status.c
@@ -160,7 +160,7 @@ status_messages (mu_mailbox_t smbox)
 {
   size_t total = 0;
   mu_mailbox_messages_count (smbox, &total);
-  util_send ("MESSAGES %u", total);
+  util_send ("MESSAGES %lu", (unsigned long) total);
   return 0;
 }
 
@@ -169,7 +169,7 @@ status_recent (mu_mailbox_t smbox)
 {
   size_t recent = 0;
   mu_mailbox_messages_recent (smbox, &recent);
-  util_send ("RECENT %u", recent);
+  util_send ("RECENT %lu", (unsigned long) recent);
   return 0;
 }
 
@@ -178,7 +178,7 @@ status_uidnext (mu_mailbox_t smbox)
 {
   size_t uidnext = 1;
   mu_mailbox_uidnext (smbox, &uidnext);
-  util_send ("UIDNEXT %u", uidnext);
+  util_send ("UIDNEXT %lu", (unsigned long) uidnext);
   return 0;
 }
 
@@ -214,6 +214,6 @@ status_unseen (mu_mailbox_t smbox)
       if (!mu_attribute_is_read (attr))
        unseen++;
     }
-  util_send ("UNSEEN %d", unseen);
+  util_send ("UNSEEN %lu", (unsigned long) unseen);
   return 0;
 }
diff --git a/imap4d/store.c b/imap4d/store.c
index 75c3023..147e800 100644
--- a/imap4d/store.c
+++ b/imap4d/store.c
@@ -151,7 +151,7 @@ imap4d_store0 (imap4d_tokbuf_t tok, int isuid, char **ptext)
          
          if (pclos.ack)
            {
-             util_send ("* %d FETCH (", msgno);
+             util_send ("* %lu FETCH (", (unsigned long) msgno);
              
              if (isuid)
                util_send ("UID %lu ", (unsigned long) msgno);
diff --git a/imap4d/sync.c b/imap4d/sync.c
index 51d2aa8..7c70732 100644
--- a/imap4d/sync.c
+++ b/imap4d/sync.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2001, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2005, 2007, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -101,7 +101,8 @@ notify_flag (size_t msgno, mu_attribute_t oattr)
            add_flag (&abuf, "\\Recent");
          }
       if (*abuf)
-       util_out (RESP_NONE, "%d FETCH FLAGS (%s)", msgno, abuf);
+       util_out (RESP_NONE, "%lu FETCH FLAGS (%s)",
+                 (unsigned long) msgno, abuf);
       free (abuf);
     }
 }
@@ -123,7 +124,8 @@ notify_deleted (void)
        {
          if (!(uid_table[i].notify))
            {
-             util_out (RESP_NONE, "%d EXPUNGED", uid_table[i].msgno-decr);
+             util_out (RESP_NONE, "%lu EXPUNGED",
+                       (unsigned long) uid_table[i].msgno-decr);
              uid_table[i].notify = 1;
              decr++;
            }
@@ -237,8 +239,8 @@ notify (void)
       mu_mailbox_messages_recent (mbox, &recent);
     }
 
-  util_out (RESP_NONE, "%d EXISTS", total);
-  util_out (RESP_NONE, "%d RECENT", recent);
+  util_out (RESP_NONE, "%lu EXISTS", (unsigned long) total);
+  util_out (RESP_NONE, "%lu RECENT", (unsigned long) recent);
 
   if (!reset)
     reset_uids ();
diff --git a/imap4d/util.c b/imap4d/util.c
index ff222ab..b5f0fa0 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -325,7 +325,7 @@ util_send_qstring (const char *buffer)
 int
 util_send_literal (const char *buffer)
 {
-  return util_send ("{%u}\r\n%s", strlen (buffer), buffer);
+  return util_send ("{%lu}\r\n%s", (unsigned long) strlen (buffer), buffer);
 }
 
 /* Send an unsolicited response.  */
diff --git a/include/mailutils/sieve.h b/include/mailutils/sieve.h
index 1ee1cdb..ac36534 100644
--- a/include/mailutils/sieve.h
+++ b/include/mailutils/sieve.h
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005, 
-   2006, 2007, 2008 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -35,7 +35,7 @@ typedef struct mu_sieve_machine *mu_sieve_machine_t;
 
 typedef struct
 {
-  const char *source_file;
+  char *source_file;
   size_t source_line;
 }
 mu_sieve_locus_t;
diff --git a/libmu_argp/common.c b/libmu_argp/common.c
index a9d9e7d..cb17690 100644
--- a/libmu_argp/common.c
+++ b/libmu_argp/common.c
@@ -20,6 +20,7 @@
 # include <config.h>
 #endif
 #include "cmdline.h"
+#include <unistd.h>
 #include <string.h>
 #include <mailutils/syslog.h>
 #include <mailutils/mailbox.h>
diff --git a/libmu_argp/muinit.c b/libmu_argp/muinit.c
index 575a329..ad82bfb 100644
--- a/libmu_argp/muinit.c
+++ b/libmu_argp/muinit.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,8 @@
 # include <config.h>
 #endif
 #include "cmdline.h"
+#include <unistd.h>
+#include <stdlib.h>
 #include <mailutils/stream.h>
 #include "xalloc.h"
 #include <string.h>
diff --git a/libmu_sieve/actions.c b/libmu_sieve/actions.c
index b3e56d8..bce1a7e 100644
--- a/libmu_sieve/actions.c
+++ b/libmu_sieve/actions.c
@@ -317,9 +317,9 @@ sieve_action_reject (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   if (rc)
     {
       mu_sieve_error (mach,
-                  _("%d: cannot create recipient address <%s>: %s"),
-                  mu_sieve_get_message_num (mach),
-                  addrtext, mu_strerror (rc));
+                     _("%lu: cannot create recipient address <%s>: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
+                     addrtext, mu_strerror (rc));
       free (addrtext);
       goto end;
     }
@@ -329,8 +329,8 @@ sieve_action_reject (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   if (rc)
     {
       mu_sieve_error (mach,
-                     _("%d: cannot create sender address <%s>: %s"),
-                     mu_sieve_get_message_num (mach),
+                     _("%lu: cannot create sender address <%s>: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
                      mu_sieve_get_daemon_email (mach),
                      mu_strerror (rc));
       goto end;
@@ -343,8 +343,8 @@ sieve_action_reject (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
       mu_mailer_get_url (mailer, &url);
        
       mu_sieve_error (mach,
-                     _("%d: cannot open mailer %s: %s"),
-                     mu_sieve_get_message_num (mach),
+                     _("%lu: cannot open mailer %s: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
                      mu_url_to_string (url),
                      mu_strerror (rc));
       goto end;
@@ -426,9 +426,9 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   if (rc)
     {
       mu_sieve_error (mach,
-                  _("%d: parsing recipient address `%s' failed: %s"),
-                  mu_sieve_get_message_num (mach),
-                  val->v.string, mu_strerror (rc));
+                     _("%lu: parsing recipient address `%s' failed: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
+                     val->v.string, mu_strerror (rc));
       return 1;
     }
   
@@ -439,8 +439,8 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   msg = mu_sieve_get_message (mach);
   if (check_redirect_loop (msg))
     {
-      mu_sieve_error (mach, _("%d: redirection loop detected"),
-                  mu_sieve_get_message_num (mach));
+      mu_sieve_error (mach, _("%lu: redirection loop detected"),
+                     (unsigned long) mu_sieve_get_message_num (mach));
       goto end;
     }
 
@@ -448,8 +448,9 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   if (rc)
     {
       mu_sieve_error (mach,
-                  _("%d: cannot get envelope sender: %s"),
-                  mu_sieve_get_message_num (mach), mu_strerror (rc));
+                     _("%lu: cannot get envelope sender: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
+                     mu_strerror (rc));
       goto end;
     }
 
@@ -457,8 +458,8 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   if (rc)
     {
       mu_sieve_error (mach,
-                     _("%d: cannot create sender address <%s>: %s"),
-                     mu_sieve_get_message_num (mach),
+                     _("%lu: cannot create sender address <%s>: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
                      fromaddr, mu_strerror (rc));
       free (fromaddr);
       goto end;
@@ -470,9 +471,9 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   if (rc)
     {
       mu_sieve_error (mach,
-                  _("%d: cannot copy message: %s"),
-                  mu_sieve_get_message_num (mach),
-                  mu_strerror (rc));
+                     _("%lu: cannot copy message: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
+                     mu_strerror (rc));
       goto end;
     }
   
@@ -485,8 +486,8 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
     }
   else
     {
-      mu_sieve_error (mach, _("%d: cannot get my email address"),
-                  mu_sieve_get_message_num (mach));
+      mu_sieve_error (mach, _("%lu: cannot get my email address"),
+                     (unsigned long) mu_sieve_get_message_num (mach));
       goto end;
     }
   
@@ -497,10 +498,10 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
       mu_mailer_get_url (mailer, &url);
        
       mu_sieve_error (mach,
-                  _("%d: cannot open mailer %s: %s"),
-                  mu_sieve_get_message_num (mach),
-                  mu_url_to_string (url),
-                  mu_strerror (rc));
+                     _("%lu: cannot open mailer %s: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
+                     mu_url_to_string (url),
+                     mu_strerror (rc));
       goto end;
     }
   
diff --git a/libmu_sieve/extensions/pipe.c b/libmu_sieve/extensions/pipe.c
index 6990a4a..f20995a 100644
--- a/libmu_sieve/extensions/pipe.c
+++ b/libmu_sieve/extensions/pipe.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -45,13 +45,13 @@
  if (!(expr))                                                                 \
    {                                                                          \
      if (ec)                                                                  \
-       mu_sieve_error (mach, "%d: %s: %s",                                    \
-                      mu_sieve_get_message_num (mach),                       \
+       mu_sieve_error (mach, "%lu: %s: %s",                                   \
+                      (unsigned long) mu_sieve_get_message_num (mach),       \
                       diag,                                                  \
                       mu_strerror (ec));                                     \
      else                                                                     \
-       mu_sieve_error (mach, "%d: %s",                                        \
-                      mu_sieve_get_message_num (mach),                       \
+       mu_sieve_error (mach, "%lu: %s",                                       \
+                      (unsigned long) mu_sieve_get_message_num (mach),       \
                       diag);                                                 \
      mu_sieve_abort (mach);                                                   \
    }
@@ -60,14 +60,14 @@
  if (!(expr))                                                                 \
    {                                                                          \
      if (ec)                                                                  \
-       mu_sieve_error (mach, "%d: `%s': %s: %s",                              \
-                      mu_sieve_get_message_num (mach),                       \
+       mu_sieve_error (mach, "%lu: `%s': %s: %s",                             \
+                      (unsigned long) mu_sieve_get_message_num (mach),       \
                       arg,                                                   \
                       diag,                                                  \
                       mu_strerror (ec));                                     \
      else                                                                     \
-       mu_sieve_error (mach, "%d: `%s': %s",                                  \
-                      mu_sieve_get_message_num (mach),                       \
+       mu_sieve_error (mach, "%lu: `%s': %s",                                 \
+                      (unsigned long) mu_sieve_get_message_num (mach),       \
                       arg,                                                   \
                       diag);                                                 \
      mu_sieve_abort (mach);                                                   \
diff --git a/libmu_sieve/extensions/vacation.c 
b/libmu_sieve/extensions/vacation.c
index e4a9cf1..ab0a7c9 100644
--- a/libmu_sieve/extensions/vacation.c
+++ b/libmu_sieve/extensions/vacation.c
@@ -202,8 +202,8 @@ regex_comparator (void *item, void *data)
               REG_EXTENDED | REG_NOSUB | REG_NEWLINE | REG_ICASE))
     {
       mu_sieve_error (d->mach,
-                     _("%d: cannot compile regular expression \"%s\""),
-                     mu_sieve_get_message_num (d->mach),
+                     _("%lu: cannot compile regular expression \"%s\""),
+                     (unsigned long) mu_sieve_get_message_num (d->mach),
                      (char*) item);
       return 0;
     }
@@ -293,8 +293,8 @@ check_db (mu_sieve_machine_t mach, mu_list_t tags, char 
*from)
 
   if (asprintf (&file, "%s/.vacation", (home ? home : ".")) == -1)
     {
-      mu_sieve_error (mach, _("%d: cannot build db file name"),
-                     mu_sieve_get_message_num (mach));
+      mu_sieve_error (mach, _("%lu: cannot build db file name"),
+                     (unsigned long) mu_sieve_get_message_num (mach));
       free (home);
       mu_sieve_abort (mach);
     }
@@ -304,8 +304,8 @@ check_db (mu_sieve_machine_t mach, mu_list_t tags, char 
*from)
   if (rc)
     {
       mu_sieve_error (mach,
-                     _("%d: cannot open `%s': %s"),
-                     mu_sieve_get_message_num (mach), file,
+                     _("%lu: cannot open `%s': %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach), file,
                      mu_strerror (rc));
       free (file);
       mu_sieve_abort (mach);
@@ -375,8 +375,8 @@ re_subject (mu_sieve_machine_t mach, mu_list_t tags, char 
**psubject)
   if (!subject)
     {
       mu_sieve_error (mach,
-                     _("%d: not enough memory"),
-                     mu_sieve_get_message_num (mach));
+                     _("%lu: not enough memory"),
+                     (unsigned long) mu_sieve_get_message_num (mach));
       return;
     }
   
@@ -433,8 +433,8 @@ vacation_subject (mu_sieve_machine_t mach, mu_list_t tags,
              mu_sieve_error (mach,
                              /* TRANSLATORS: 'vacation' is the name of the
                                 Sieve action. Do not translate it! */
-                             _("%d: vacation - cannot compile reply prefix 
regexp: %s: %s"),
-                             mu_sieve_get_message_num (mach),
+                             _("%lu: vacation - cannot compile reply prefix 
regexp: %s: %s"),
+                             (unsigned long) mu_sieve_get_message_num (mach),
                              mu_strerror (rc),
                              err ? err : "");
            }
@@ -483,8 +483,9 @@ vacation_reply (mu_sieve_machine_t mach, mu_list_t tags, 
mu_message_t msg,
   if (rc)
     {
       mu_sieve_error (mach,
-                     _("%d: cannot create recipient address <%s>: %s"),
-                     mu_sieve_get_message_num (mach), from, mu_strerror (rc));
+                     _("%lu: cannot create recipient address <%s>: %s"),
+                     (unsigned long) mu_sieve_get_message_num (mach),
+                     from, mu_strerror (rc));
     }
   else
     {
@@ -522,8 +523,8 @@ vacation_reply (mu_sieve_machine_t mach, mu_list_t tags, 
mu_message_t msg,
          mu_mailer_get_url (mailer, &url);
       
          mu_sieve_error (mach,
-                         _("%d: cannot open mailer %s: %s"),
-                         mu_sieve_get_message_num (mach),
+                         _("%lu: cannot open mailer %s: %s"),
+                         (unsigned long) mu_sieve_get_message_num (mach),
                          mu_url_to_string (url), mu_strerror (rc));
        }
       else
@@ -572,8 +573,8 @@ sieve_action_vacation (mu_sieve_machine_t mach, mu_list_t 
args, mu_list_t tags)
   else if (mu_sieve_get_message_sender (msg, &from))
     {
       mu_sieve_error (mach,
-                     _("%d: cannot get sender address"),
-                     mu_sieve_get_message_num (mach));
+                     _("%lu: cannot get sender address"),
+                     (unsigned long) mu_sieve_get_message_num (mach));
       mu_sieve_abort (mach);
     }
 
diff --git a/libmu_sieve/prog.c b/libmu_sieve/prog.c
index 79141ae..99f68d8 100644
--- a/libmu_sieve/prog.c
+++ b/libmu_sieve/prog.c
@@ -263,9 +263,9 @@ mu_sv_code_command (mu_sieve_register_t *reg, mu_list_t 
arglist)
                  else
                    {
                      mu_sv_compile_error (&mu_sieve_locus, 
-                                      _("type mismatch in argument %d to 
`%s'"),
-                                     exp_arg - reg->req_args + 1,
-                                     reg->name);
+                                   _("type mismatch in argument %lu to `%s'"),
+                                  (unsigned long) (exp_arg - reg->req_args + 
1),
+                                          reg->name);
                      mu_sv_compile_error (&mu_sieve_locus, 
                                           _("expected %s but passed %s"),
                                           mu_sieve_type_str (*exp_arg),
diff --git a/libmu_sieve/require.c b/libmu_sieve/require.c
index 06f382a..be9ddea 100644
--- a/libmu_sieve/require.c
+++ b/libmu_sieve/require.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2004, 
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -47,7 +47,7 @@ mu_sieve_require (mu_list_t slist)
     {
       char *name;
       int (*reqfn) (mu_sieve_machine_t mach, const char *name) = NULL;
-      char *text = NULL;
+      const char *text = NULL;
       
       mu_iterator_current (itr, (void **)&name);
 
diff --git a/libmu_sieve/runtime.c b/libmu_sieve/runtime.c
index 9c7da4f..ceb97c0 100644
--- a/libmu_sieve/runtime.c
+++ b/libmu_sieve/runtime.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -44,11 +44,11 @@ _mu_sv_instr_nop (mu_sieve_machine_t mach)
 void
 _mu_sv_instr_source (mu_sieve_machine_t mach)
 {
-  mach->locus.source_file = SIEVE_ARG (mach, 0, string);
+  mach->locus.source_file = (char*) SIEVE_ARG (mach, 0, string);
   if (INSTR_DEBUG (mach))
     mu_sieve_debug (mach, "%4lu: SOURCE %s\n",
-                (unsigned long) (mach->pc - 1),
-                mach->locus.source_file);
+                   (unsigned long) (mach->pc - 1),
+                   mach->locus.source_file);
   SIEVE_ADJUST (mach, 1);
 }
                 
diff --git a/libmu_sieve/sieve-priv.h b/libmu_sieve/sieve-priv.h
index ce65f67..ae99bb1 100644
--- a/libmu_sieve/sieve-priv.h
+++ b/libmu_sieve/sieve-priv.h
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005, 2006,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -96,7 +96,7 @@ int mu_sv_lex_begin (const char *name);
 int mu_sv_lex_begin_string (const char *buf, int bufsize,
                            const char *fname, int line);
 void mu_sv_lex_finish (void);
-int mu_sieve_yyerror (char *s);
+int mu_sieve_yyerror (const char *s);
 int mu_sieve_yylex (); 
 
 void mu_sv_register_standard_actions (mu_sieve_machine_t mach);
diff --git a/libmu_sieve/sieve.y b/libmu_sieve/sieve.y
index 3b25465..dd1334f 100644
--- a/libmu_sieve/sieve.y
+++ b/libmu_sieve/sieve.y
@@ -1,7 +1,7 @@
 %{
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005,
-   2006, 2007, 2008 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -341,7 +341,7 @@ slist        : STRING
 %%
 
 int
-yyerror (char *s)
+yyerror (const char *s)
 {
   mu_sv_compile_error (&mu_sieve_locus, "%s", s);
   return 0;
diff --git a/libproto/imap/folder.c b/libproto/imap/folder.c
index 56dac5d..c38b364 100644
--- a/libproto/imap/folder.c
+++ b/libproto/imap/folder.c
@@ -207,15 +207,15 @@ authenticate_imap_login (mu_authority_t auth)
        else if (status)
          return status;
        
-       status = imap_writeline (f_imap, "g%u LOGIN \"%s\" \"%s\"\r\n",
-                                f_imap->seq, f_imap->user,
+       status = imap_writeline (f_imap, "g%lu LOGIN \"%s\" \"%s\"\r\n",
+                                (unsigned long) f_imap->seq, f_imap->user,
                                 mu_secret_password (f_imap->secret));
        mu_secret_password_unref (f_imap->secret);
        mu_secret_unref (f_imap->secret);
        f_imap->secret = NULL;
        CHECK_ERROR_CLOSE (folder, f_imap, status);
-       MU_DEBUG2 (folder->debug, MU_DEBUG_TRACE, "g%u LOGIN %s *\n",
-                  f_imap->seq, f_imap->user);
+       MU_DEBUG2 (folder->debug, MU_DEBUG_TRACE, "g%lu LOGIN %s *\n",
+                  (unsigned long) f_imap->seq, f_imap->user);
        f_imap->seq++;
        free (f_imap->user);
        f_imap->user = NULL;
@@ -311,10 +311,10 @@ authenticate_imap_sasl_anon (mu_authority_t auth)
     case IMAP_AUTH_ANON_REQ_WRITE:
       {
        MU_DEBUG1 (folder->debug, MU_DEBUG_PROT, 
-                   "g%u AUTHENTICATE ANONYMOUS\n",
-                  f_imap->seq);
-       status = imap_writeline (f_imap, "g%u AUTHENTICATE ANONYMOUS\r\n",
-                                f_imap->seq);
+                   "g%lu AUTHENTICATE ANONYMOUS\n",
+                  (unsigned long) f_imap->seq);
+       status = imap_writeline (f_imap, "g%lu AUTHENTICATE ANONYMOUS\r\n",
+                                (unsigned long) f_imap->seq);
        f_imap->seq++;
        CHECK_ERROR_CLOSE (folder, f_imap, status);
        f_imap->auth_state = IMAP_AUTH_ANON_REQ_SEND;
@@ -539,8 +539,8 @@ read_capa (f_imap_t f_imap, int force)
   
   if (!f_imap->capav)
     {
-      status = imap_writeline (f_imap, "g%u CAPABILITY\r\n",
-                              f_imap->seq++);
+      status = imap_writeline (f_imap, "g%lu CAPABILITY\r\n",
+                              (unsigned long) f_imap->seq++);
       status = imap_send (f_imap);
       status = imap_parse (f_imap);
     }
@@ -787,7 +787,8 @@ folder_imap_close (mu_folder_t folder)
   switch (f_imap->state)
     {
     case IMAP_NO_STATE:
-      status = imap_writeline (f_imap, "g%u LOGOUT\r\n", f_imap->seq++);
+      status = imap_writeline (f_imap, "g%lu LOGOUT\r\n",
+                              (unsigned long) f_imap->seq++);
       CHECK_ERROR (f_imap, status);
       MU_DEBUG (folder->debug, MU_DEBUG_PROT, f_imap->buffer);
       f_imap->state = IMAP_LOGOUT;
@@ -831,7 +832,8 @@ folder_imap_delete (mu_folder_t folder, const char *name)
   switch (f_imap->state)
     {
     case IMAP_NO_STATE:
-      status = imap_writeline (f_imap, "g%u DELETE %s\r\n", f_imap->seq++,
+      status = imap_writeline (f_imap, "g%lu DELETE %s\r\n",
+                              (unsigned long) f_imap->seq++,
                               name);
       CHECK_ERROR (f_imap, status);
       MU_DEBUG (folder->debug, MU_DEBUG_PROT, f_imap->buffer);
@@ -1007,8 +1009,8 @@ folder_imap_list (mu_folder_t folder, const char *ref, 
void *name,
     {
     case IMAP_NO_STATE:
       path = glob_to_imap (name, max_level != 1);
-      status = imap_writeline (f_imap, "g%u LIST \"%s\" \"%s\"\r\n",
-                              f_imap->seq++, ref, path);
+      status = imap_writeline (f_imap, "g%lu LIST \"%s\" \"%s\"\r\n",
+                              (unsigned long) f_imap->seq++, ref, path);
       free (path);
       CHECK_ERROR (f_imap, status);
       MU_DEBUG (folder->debug, MU_DEBUG_PROT, f_imap->buffer);
@@ -1063,8 +1065,8 @@ folder_imap_lsub (mu_folder_t folder, const char *ref, 
const char *name,
   switch (f_imap->state)
     {
     case IMAP_NO_STATE:
-      status = imap_writeline (f_imap, "g%u LSUB \"%s\" \"%s\"\r\n",
-                              f_imap->seq++, ref, name);
+      status = imap_writeline (f_imap, "g%lu LSUB \"%s\" \"%s\"\r\n",
+                              (unsigned long) f_imap->seq++, ref, name);
       CHECK_ERROR (f_imap, status);
       MU_DEBUG (folder->debug, MU_DEBUG_PROT, f_imap->buffer);
       f_imap->state = IMAP_LSUB;
@@ -1108,8 +1110,9 @@ folder_imap_rename (mu_folder_t folder, const char 
*oldpath,
   switch (f_imap->state)
     {
     case IMAP_NO_STATE:
-      status = imap_writeline (f_imap, "g%u RENAME %s %s\r\n",
-                              f_imap->seq++, oldpath, newpath);
+      status = imap_writeline (f_imap, "g%lu RENAME %s %s\r\n",
+                              (unsigned long) f_imap->seq++,
+                              oldpath, newpath);
       CHECK_ERROR (f_imap, status);
       MU_DEBUG (folder->debug, MU_DEBUG_PROT, f_imap->buffer);
       f_imap->state = IMAP_RENAME;
@@ -1146,8 +1149,8 @@ folder_imap_subscribe (mu_folder_t folder, const char 
*name)
   switch (f_imap->state)
     {
     case IMAP_NO_STATE:
-      status = imap_writeline (f_imap, "g%u SUBSCRIBE %s\r\n",
-                              f_imap->seq++, name);
+      status = imap_writeline (f_imap, "g%lu SUBSCRIBE %s\r\n",
+                              (unsigned long) f_imap->seq++, name);
       CHECK_ERROR (f_imap, status);
       MU_DEBUG (folder->debug, MU_DEBUG_PROT, f_imap->buffer);
       f_imap->state = IMAP_SUBSCRIBE;
@@ -1184,8 +1187,8 @@ folder_imap_unsubscribe (mu_folder_t folder, const char 
*name)
   switch (f_imap->state)
     {
     case IMAP_NO_STATE:
-      status = imap_writeline (f_imap, "g%u UNSUBSCRIBE %s\r\n",
-                              f_imap->seq++, name);
+      status = imap_writeline (f_imap, "g%lu UNSUBSCRIBE %s\r\n",
+                              (unsigned long) f_imap->seq++, name);
       CHECK_ERROR (f_imap, status);
       MU_DEBUG (folder->debug, MU_DEBUG_PROT, f_imap->buffer);
       f_imap->state = IMAP_UNSUBSCRIBE;
diff --git a/libproto/imap/mbox.c b/libproto/imap/mbox.c
index 8aada6c..5c561d6 100644
--- a/libproto/imap/mbox.c
+++ b/libproto/imap/mbox.c
@@ -315,10 +315,10 @@ mailbox_imap_open (mu_mailbox_t mailbox, int flags)
              return 0;
            else if (status)
              return status;
-           status = imap_writeline (f_imap, "g%u CREATE %s\r\n",
-                                    f_imap->seq, path);
-           MU_DEBUG2 (folder->debug, MU_DEBUG_PROT, "g%u CREATE %s\n",
-                      f_imap->seq, path);
+           status = imap_writeline (f_imap, "g%lu CREATE %s\r\n",
+                                    (unsigned long) f_imap->seq, path);
+           MU_DEBUG2 (folder->debug, MU_DEBUG_PROT, "g%lu CREATE %s\n",
+                      (unsigned long) f_imap->seq, path);
            f_imap->seq++;
            if (status != 0)
              {
diff --git a/libproto/mailer/sendmail.c b/libproto/mailer/sendmail.c
index beaf24d..0e112da 100644
--- a/libproto/mailer/sendmail.c
+++ b/libproto/mailer/sendmail.c
@@ -236,8 +236,8 @@ sendmail_send_message (mu_mailer_t mailer, mu_message_t 
msg, mu_address_t from,
            {
              free (argvec);
              MU_DEBUG2 (mailer->debug, MU_DEBUG_ERROR,
-                        "cannot get email of recipient #%d: %s\n",
-                        i, mu_strerror (status));
+                        "cannot get email of recipient #%lu: %s\n",
+                        (unsigned long) i, mu_strerror (status));
              return status;
            }
          
diff --git a/libproto/mbox/mbox.c b/libproto/mbox/mbox.c
index c129dc0..12a2558 100644
--- a/libproto/mbox/mbox.c
+++ b/libproto/mbox/mbox.c
@@ -1194,8 +1194,8 @@ mbox_get_message (mu_mailbox_t mailbox, size_t msgno, 
mu_message_t *pmsg)
       return 0;
     }
 
-  MU_DEBUG2 (mailbox->debug, MU_DEBUG_TRACE1, "mbox_get_message (%s, %d)\n",
-                 mud->name, msgno);
+  MU_DEBUG2 (mailbox->debug, MU_DEBUG_TRACE1, "mbox_get_message (%s, %lu)\n",
+            mud->name, (unsigned long) msgno);
 
   return new_message (mailbox, mum, pmsg);
 }
diff --git a/libproto/pop/pop3_list.c b/libproto/pop/pop3_list.c
index e5d411f..ed708a8 100644
--- a/libproto/pop/pop3_list.c
+++ b/libproto/pop/pop3_list.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,8 @@ int
 mu_pop3_list (mu_pop3_t pop3, unsigned int msgno, size_t *psize)
 {
   int status;
-
+  unsigned long lv;
+  
   if (pop3 == NULL || msgno == 0)
     return EINVAL;
   if (psize == NULL)
@@ -57,8 +58,9 @@ mu_pop3_list (mu_pop3_t pop3, unsigned int msgno, size_t 
*psize)
       pop3->state = MU_POP3_NO_STATE;
 
       /* Parse the answer.  */
-      *psize = 0;
-      sscanf (pop3->ack.buf, "+OK %d %d", &msgno, psize);
+      lv = 0;
+      sscanf (pop3->ack.buf, "+OK %d %lu", &msgno, &lv);
+      *psize = lv;
       break;
 
       /* They must deal with the error first by reopening.  */
diff --git a/libproto/pop/pop3_stat.c b/libproto/pop/pop3_stat.c
index 05ab1af..682531b 100644
--- a/libproto/pop/pop3_stat.c
+++ b/libproto/pop/pop3_stat.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -28,7 +28,8 @@ int
 mu_pop3_stat (mu_pop3_t pop3, unsigned *msg_count, size_t *size)
 {
   int status;
-
+  unsigned long lv;
+  
   if (pop3 == NULL || msg_count == NULL)
     return EINVAL;
   if (size == NULL)
@@ -57,8 +58,9 @@ mu_pop3_stat (mu_pop3_t pop3, unsigned *msg_count, size_t 
*size)
 
       /* Parse the answer.  */
       *msg_count = 0;
-      *size = 0;
-      sscanf (pop3->ack.buf, "+OK %d %d", msg_count, size);
+      lv = 0;
+      sscanf (pop3->ack.buf, "+OK %d %lu", msg_count, &lv);
+      *size = lv;
       break;
 
       /* They must deal with the error first by reopening.  */
diff --git a/maidag/lmtp.c b/maidag/lmtp.c
index 6842f53..46b245d 100644
--- a/maidag/lmtp.c
+++ b/maidag/lmtp.c
@@ -62,7 +62,7 @@ lmtp_reply (FILE *fp, char *code, char *enh, char *fmt, ...)
          fprintf (fp, "%s-", code);
          if (enh)
            fprintf (fp, "%s ", enh);
-         fprintf (fp, "%.*s\r\n", len, str);
+         fprintf (fp, "%.*s\r\n", (int) len, str);
          for (str = end; *str && *str == '\n'; str++);
        }
       else
diff --git a/maidag/sieve.c b/maidag/sieve.c
index 92d2443..e9c17c9 100644
--- a/maidag/sieve.c
+++ b/maidag/sieve.c
@@ -57,7 +57,8 @@ _sieve_action_log (void *user_name,
     {
       size_t uid = 0;
       mu_message_get_uid (msg, &uid);
-      mu_diag_printf (MU_DIAG_NOTICE, _("%s on msg uid %d"), action, uid);
+      mu_diag_printf (MU_DIAG_NOTICE, _("%s on msg uid %lu"), action,
+                     (unsigned long) uid);
     }
   
   if (fmt && strlen (fmt))
diff --git a/mail/copy.c b/mail/copy.c
index effba42..604d063 100644
--- a/mail/copy.c
+++ b/mail/copy.c
@@ -108,7 +108,8 @@ mail_copy0 (int argc, char **argv, int mark)
     }
 
   if (status == 0)
-    fprintf (ofile, "\"%s\" %3d/%-5d\n", filename, total_lines, total_size);
+    fprintf (ofile, "\"%s\" %3lu/%-5lu\n", filename,
+            (unsigned long) total_lines, (unsigned long) total_size);
 
   mu_mailbox_close (mbx);
   mu_mailbox_destroy (&mbx);
diff --git a/mail/decode.c b/mail/decode.c
index 5de847c..6327456 100644
--- a/mail/decode.c
+++ b/mail/decode.c
@@ -127,9 +127,9 @@ fprint_msgset (FILE *fp, const msgset_t *msgset)
   int i;
   size_t n = 0;
   
-  n = fprintf (fp, "%d", msgset->msg_part[0]);
+  n = fprintf (fp, "%lu", (unsigned long) msgset->msg_part[0]);
   for (i = 1; i < msgset->npart; i++)
-    n += fprintf (fp, "[%d", msgset->msg_part[i]);
+    n += fprintf (fp, "[%lu", (unsigned long) msgset->msg_part[i]);
   for (i = 1; i < msgset->npart; i++)
     n += fprintf (fp, "]");
   return n;
diff --git a/mail/envelope.c b/mail/envelope.c
index 24d9391..8525ccc 100644
--- a/mail/envelope.c
+++ b/mail/envelope.c
@@ -30,7 +30,8 @@ print_envelope (msgset_t *mspec, mu_message_t msg, void *data)
   status = mu_message_get_envelope (msg, &env);
   if (status)
     {
-      mu_error (_("%d: Cannot get envelope"), mspec->msg_part[0]);
+      mu_error (_("%lu: Cannot get envelope"),
+               (unsigned long) mspec->msg_part[0]);
     }
   else
     {
diff --git a/mail/eq.c b/mail/eq.c
index 4d63411..26113a9 100644
--- a/mail/eq.c
+++ b/mail/eq.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2001, 2002, 2003, 2005, 
-   2007 Free Software Foundation, Inc.
+   2007, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ mail_eq (int argc, char **argv)
       if (n == 0)
         util_error (_("No applicable message"));
       else
-        fprintf (ofile, "%u\n", n);
+        fprintf (ofile, "%lu\n", (unsigned long) n);
       break;
 
     case 2:
@@ -45,7 +45,7 @@ mail_eq (int argc, char **argv)
          if (list->msg_part[0] <= total)
            {
              set_cursor (list->msg_part[0]);
-             fprintf (ofile, "%u\n", list->msg_part[0]);
+             fprintf (ofile, "%lu\n", (unsigned long) list->msg_part[0]);
            }
          else
            util_error_range (list->msg_part[0]);
diff --git a/mail/escape.c b/mail/escape.c
index e44283e..b2e016c 100644
--- a/mail/escape.c
+++ b/mail/escape.c
@@ -433,7 +433,8 @@ quote0 (msgset_t *mspec, mu_message_t mesg, void *data)
   size_t n = 0;
   char *prefix = "\t";
   
-  fprintf (stdout, _("Interpolating: %d\n"), mspec->msg_part[0]);
+  fprintf (stdout, _("Interpolating: %lu\n"),
+          (unsigned long) mspec->msg_part[0]);
 
   mailvar_get (&prefix, "indentprefix", mailvar_type_string, 0);
 
diff --git a/mail/from.c b/mail/from.c
index 31e2a92..75212e1 100644
--- a/mail/from.c
+++ b/mail/from.c
@@ -115,11 +115,11 @@ format_headline (struct header_segm *seg, msgset_t 
*mspec, mu_message_t msg)
       if (seg->align == ALIGN_RIGHT)
        {
          format_pad (width - len);
-         fprintf (ofile, "%*.*s", len, len, p);
+         fprintf (ofile, "%*.*s", (int) len, (int) len, p);
        }
       else
        {
-         fprintf (ofile, "%*.*s", len, len, p);
+         fprintf (ofile, "%*.*s", (int) len, (int) len, p);
          format_pad (width - len);
        }
       out_cols += width;
diff --git a/mail/mail.h b/mail/mail.h
index d9950b0..50d3e31 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -410,8 +410,8 @@ extern int ml_got_interrupt (void);
 extern void ml_clear_interrupt (void);
 extern void ml_readline_init (void);
 extern int ml_reread (const char *prompt, char **text);
-extern char *ml_readline (char *prompt);
-extern char *ml_readline_with_intr (char *prompt);
+extern char *ml_readline (const char *prompt);
+extern char *ml_readline_with_intr (const char *prompt);
 
 extern char *alias_expand (const char *name);
 extern void alias_destroy (const char *name);
diff --git a/mail/mailline.c b/mail/mailline.c
index 4ed1c3a..dabf66e 100644
--- a/mail/mailline.c
+++ b/mail/mailline.c
@@ -175,7 +175,7 @@ ml_readline_internal ()
 }
 
 char *
-ml_readline (char *prompt)
+ml_readline (const char *prompt)
 {
   if (interactive)
     return readline (prompt);
@@ -183,7 +183,7 @@ ml_readline (char *prompt)
 }
 
 char *
-ml_readline_with_intr (char *prompt)
+ml_readline_with_intr (const char *prompt)
 {
   char *str = ml_readline (prompt);
   if (_interrupted)
diff --git a/mail/mailvar.c b/mail/mailvar.c
index e5cc5ce..f948b1a 100644
--- a/mail/mailvar.c
+++ b/mail/mailvar.c
@@ -285,14 +285,15 @@ find_mailvar_symbol (const char *var)
 }
 
 static void
-print_descr (FILE *out, char *s, int n, int doc_col, int rmargin, char *pfx)
+print_descr (FILE *out, const char *s, int n,
+            int doc_col, int rmargin, char *pfx)
 {
   if (!s)
     return;
   do
     {
-      char *p;
-      char *space = NULL;
+      const char *p;
+      const char *space = NULL;
 
       if (n == 1 && pfx)
        n += fprintf (out, "%s", pfx);
diff --git a/mail/size.c b/mail/size.c
index 6f5a14c..dddf48d 100644
--- a/mail/size.c
+++ b/mail/size.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2001, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2005, 2007, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,9 +30,11 @@ size0 (msgset_t *mspec, mu_message_t msg, void *data)
   mu_message_size (msg, &size);
   mu_message_lines (msg, &lines);
   
-  fprintf (ofile, "%c%2d %3d/%-5d\n",
+  fprintf (ofile, "%c%2lu %3lu/%-5lu\n",
           is_current_message (mspec->msg_part[0]) ? '>' : ' ',
-          mspec->msg_part[0], lines, size);
+          (unsigned long) mspec->msg_part[0],
+          (unsigned long) lines,
+          (unsigned long) size);
   return 0;
 }
 
diff --git a/mail/util.c b/mail/util.c
index b6c3ba5..0e1e0b0 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -387,7 +387,7 @@ util_screen_lines ()
   if (mailvar_get (&screen, "screen", mailvar_type_number, 0) == 0)
     return screen;
   n = util_getlines();
-  util_do_command ("set screen=%d", n);
+  util_do_command ("set screen=%lu", (unsigned long) n);
   return n;
 }
 
@@ -400,7 +400,7 @@ util_screen_columns ()
   if (mailvar_get (&cols, "columns", mailvar_type_number, 0) == 0)
     return cols;
   n = util_getcols();
-  util_do_command ("set columns=%d", n);
+  util_do_command ("set columns=%lu", (unsigned long) n);
   return n;
 }
 
@@ -794,15 +794,15 @@ util_descend_subparts (mu_message_t mesg, msgset_t 
*msgset, mu_message_t *part)
       mu_message_get_num_parts (mesg, &nparts);
       if (nparts < msgset->msg_part[i])
        {
-         util_error (_("No such (sub)part in the message: %d"),
-                     msgset->msg_part[i]);
+         util_error (_("No such (sub)part in the message: %lu"),
+                     (unsigned long) msgset->msg_part[i]);
          return 1;
        }
 
       if (mu_message_get_part (mesg, msgset->msg_part[i], &submsg))
        {
-         util_error (_("Cannot get (sub)part from the message: %d"),
-                     msgset->msg_part[i]);
+         util_error (_("Cannot get (sub)part from the message: %lu"),
+                     (unsigned long) msgset->msg_part[i]);
          return 1;
        }
 
@@ -1039,7 +1039,7 @@ util_get_message (mu_mailbox_t mbox, size_t msgno, 
mu_message_t *msg)
 int
 util_error_range (size_t msgno)
 {
-  util_error (_("%d: invalid message number"), msgno);
+  util_error (_("%lu: invalid message number"), (unsigned long) msgno);
   return 1;
 }
 
diff --git a/mail/write.c b/mail/write.c
index 511b921..5c396fb 100644
--- a/mail/write.c
+++ b/mail/write.c
@@ -50,7 +50,7 @@ mail_write (int argc, char **argv)
           util_error (_("No applicable message"));
           return 1;
         }
-      asprintf (&p, "%u", n);
+      asprintf (&p, "%lu", (unsigned long) n);
       filename = util_outfolder_name (p);
       free (p);
     }
@@ -115,7 +115,8 @@ mail_write (int argc, char **argv)
       mu_attribute_set_userflag (attr, MAIL_ATTRIBUTE_SAVED);
     }
 
-  fprintf (ofile, "\"%s\" %3d/%-5d\n", filename, total_lines, total_size);
+  fprintf (ofile, "\"%s\" %3lu/%-5lu\n", filename,
+          (unsigned long) total_lines, (unsigned long) total_size);
 
   free (filename);
   fclose (output);
diff --git a/mailbox/cfg_format.c b/mailbox/cfg_format.c
index a7f3d0f..6633bb1 100644
--- a/mailbox/cfg_format.c
+++ b/mailbox/cfg_format.c
@@ -1,5 +1,5 @@
 /* cfg_print.c -- convert configuration parse tree to human-readable format.
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -132,8 +132,9 @@ format_node (const mu_cfg_node_t *node, void *data)
   struct tree_print *tp = data;
 
   if (node->locus.file)
-    mu_stream_sequential_printf (tp->stream, "# %d \"%s\"\n",
-                                node->locus.line, node->locus.file);
+    mu_stream_sequential_printf (tp->stream, "# %lu \"%s\"\n",
+                                (unsigned long) node->locus.line, 
+                                 node->locus.file);
   format_level (tp->stream, tp->level);
   switch (node->type)
     {
diff --git a/mailbox/folder.c b/mailbox/folder.c
index d685733..fec5b43 100644
--- a/mailbox/folder.c
+++ b/mailbox/folder.c
@@ -181,11 +181,9 @@ mu_folder_destroy (mu_folder_t *pfolder)
       if (folder->ref <= 0)
        mu_list_remove (known_folder_list, folder);
       /* If the list is empty we can safely remove it.  */
-      if (mu_list_is_empty)
-       {
-         mu_list_destroy (&known_folder_list);
-         known_folder_list = NULL;
-       }
+      if (mu_list_is_empty (known_folder_list))
+       mu_list_destroy (&known_folder_list);
+
       mu_monitor_unlock (&folder_lock);
 
       if (folder->ref <= 0)
diff --git a/mailbox/parse822.c b/mailbox/parse822.c
index 41d1bc0..6490ff9 100644
--- a/mailbox/parse822.c
+++ b/mailbox/parse822.c
@@ -1783,7 +1783,7 @@ struct tm
 
 int
 mu_parse822_date_time (const char **p, const char *e, struct tm *tm,
-                   struct mu_timezone *tz)
+                      struct mu_timezone *tz)
 {
   /* date-time = [ day "," ] date time */
 
@@ -1852,7 +1852,7 @@ mu_parse822_date_time (const char **p, const char *e, 
struct tm *tm,
       tm->tm_gmtoff = tzoffset;
 #endif
 #ifdef HAVE_STRUCT_TM_TM_ZONE
-      tm->tm_zone = tz_name;
+      tm->tm_zone = (char*) tz_name;
 #endif
     }
 
diff --git a/mailbox/system.c b/mailbox/system.c
index c842cff..bd16b4b 100644
--- a/mailbox/system.c
+++ b/mailbox/system.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -118,9 +118,10 @@ mu_authenticate_system (struct mu_auth_data **return_data 
MU_ARG_UNUSED,
                        void *call_data)
 {
   const struct mu_auth_data *auth_data = key;
-  char *pass = call_data;
 
 #ifdef HAVE_SHADOW_H
+  char *pass = call_data;
+  
   if (auth_data)
     {
       struct spwd *spw;
diff --git a/messages/messages.c b/messages/messages.c
index f894ae7..2b1bff1 100644
--- a/messages/messages.c
+++ b/messages/messages.c
@@ -170,9 +170,9 @@ messages_count (const char *box)
     }
 
   if (silent)
-    printf ("%d\n", count);
+    printf ("%lu\n", (unsigned long) count);
   else
-    printf (_("Number of messages in %s: %d\n"), box, count);
+    printf (_("Number of messages in %s: %lu\n"), box, (unsigned long) count);
 
   status = mu_mailbox_close (mbox);
   if (status != 0)
diff --git a/mh/folder.c b/mh/folder.c
index a9fdf7a..f13e9bc 100644
--- a/mh/folder.c
+++ b/mh/folder.c
@@ -863,7 +863,8 @@ action_pack ()
       status = mu_mailbox_get_message (mbox, i + 1, &msg);
       if (status)
        {
-         mu_error (_("%d: cannot get message: %s"), i, mu_strerror (status));
+         mu_error (_("%lu: cannot get message: %s"),
+                   (unsigned long) i, mu_strerror (status));
          return 1;
        }
       mh_message_number (msg, &pack_tab[i].orig);
diff --git a/mh/forw.c b/mh/forw.c
index 7d5c395..b302bec 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -389,12 +389,12 @@ finish_draft ()
       if (msgset.count == 1)
        {
          fd.num = 0;
-         str = _("Forwarded message\n");
+         str = (char*) _("Forwarded message\n");
        }
       else
        {
          fd.num = 1;
-         str = _("Forwarded messages\n");
+         str = (char*) _("Forwarded messages\n");
        }
   
       rc = mu_stream_sequential_write (stream, str, strlen (str));
@@ -406,9 +406,9 @@ finish_draft ()
       rc = mu_stream_sequential_write (stream, str, strlen (str));
       
       if (msgset.count == 1)
-       str = _("End of Forwarded message");
+       str = (char*) _("End of Forwarded message");
       else
-       str = _("End of Forwarded messages");
+       str = (char*) _("End of Forwarded messages");
       
       rc = mu_stream_sequential_write (stream, str, strlen (str));
     }
diff --git a/mh/inc.c b/mh/inc.c
index 841636c..bf89e41 100644
--- a/mh/inc.c
+++ b/mh/inc.c
@@ -250,15 +250,15 @@ main (int argc, char **argv)
       
       if ((rc = mu_mailbox_get_message (input, n, &imsg)) != 0)
        {
-         mu_error (_("%d: cannot get message: %s"),
-                   n, mu_strerror (rc));
+         mu_error (_("%lu: cannot get message: %s"),
+                   (unsigned long) n, mu_strerror (rc));
          continue;
        }
 
       if ((rc = mu_mailbox_append_message (output, imsg)) != 0)
        {
-         mu_error (_("%d: error appending message: %s"),
-                   n, mu_strerror (rc));
+         mu_error (_("%lu: error appending message: %s"),
+                   (unsigned long) n, mu_strerror (rc));
          continue;
        }
 
diff --git a/mh/mh.h b/mh/mh.h
index 8631626..cc580e2 100644
--- a/mh/mh.h
+++ b/mh/mh.h
@@ -365,6 +365,6 @@ void mh_comp_draft (const char *formfile, const char 
*defformfile,
                    const char *draftfile);
 int check_draft_disposition (struct mh_whatnow_env *wh, int use_draft);
 
-void ali_parse_error (char *fmt, ...) MU_PRINTFLIKE(1,2); 
+void ali_parse_error (const char *fmt, ...) MU_PRINTFLIKE(1,2); 
 void ali_verbatim (int enable);
 
diff --git a/mh/mh_alias.l b/mh/mh_alias.l
index af1293d..e28da65 100644
--- a/mh/mh_alias.l
+++ b/mh/mh_alias.l
@@ -28,7 +28,8 @@ size_t ali_line_num;
 ino_t ali_source_inode;
 
 void
-va_ali_parse_error_loc (char *name, size_t line, char *fmt, va_list ap)
+va_ali_parse_error_loc (const char *name, size_t line,
+                             const char *fmt, va_list ap)
 {
   char *buf;
 
@@ -41,7 +42,7 @@ va_ali_parse_error_loc (char *name, size_t line, char *fmt, 
va_list ap)
 }
 
 void
-ali_parse_error_loc (char *name, size_t line, char *fmt, ...)
+ali_parse_error_loc (const char *name, size_t line, const char *fmt, ...)
 {
   va_list ap;
 
@@ -51,7 +52,7 @@ ali_parse_error_loc (char *name, size_t line, char *fmt, ...)
 }
 
 void
-ali_parse_error (char *fmt, ...)
+ali_parse_error (const char *fmt, ...)
 {
   va_list ap;
 
diff --git a/mh/mh_fmtgram.y b/mh/mh_fmtgram.y
index d1b0841..a1360cb 100644
--- a/mh/mh_fmtgram.y
+++ b/mh/mh_fmtgram.y
@@ -23,7 +23,7 @@
 #define obstack_chunk_free free
 #include <obstack.h>
 
-int yyerror (char *s);
+int yyerror (const char *s);
 int yylex ();
  
 static mh_format_t format;     /* Format structure being built */
@@ -355,7 +355,7 @@ static char *start;
 static char *curp;
 
 int
-yyerror (char *s)
+yyerror (const char *s)
 {
   int len;
   mu_error ("%s: %s", start, s);
diff --git a/mh/mh_getopt.h b/mh/mh_getopt.h
index 710da5b..45889a6 100644
--- a/mh/mh_getopt.h
+++ b/mh/mh_getopt.h
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2002, 2005, 2007  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 3594374..20cccda 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -529,7 +529,8 @@ mh_iterate (mu_mailbox_t mbox, mh_msgset_t *msgset,
       num = msgset->list[i];
       if ((rc = mu_mailbox_get_message (mbox, num, &msg)) != 0)
        {
-         mu_error (_("cannot get message %d: %s"), num, mu_strerror (rc));
+         mu_error (_("cannot get message %lu: %s"),
+                   (unsigned long) num, mu_strerror (rc));
          return 1;
        }
 
diff --git a/mh/mh_msgset.c b/mh/mh_msgset.c
index a5f3dfa..ab2ecfe 100644
--- a/mh/mh_msgset.c
+++ b/mh/mh_msgset.c
@@ -162,7 +162,8 @@ msgset_preproc_part (mu_mailbox_t mbox, char *arg, char 
**rest)
        rc = mu_mailbox_get_message (mbox, num, &msg);
        if (rc)
          {
-           mu_error (_("cannot get message %d: %s"), num, mu_strerror (rc));
+           mu_error (_("cannot get message %lu: %s"),
+                     (unsigned long) num, mu_strerror (rc));
            exit (1);
          }
        *rest = arg + strlen (p->name);
@@ -349,7 +350,8 @@ _mh_msgset_parse (mu_mailbox_t mbox, mh_msgset_t *msgset, 
int argc, char **argv)
              n = mh_get_message (mbox, start, NULL);
              if (!n)
                {
-                 mu_error (_("message %d does not exist"), start);
+                 mu_error (_("message %lu does not exist"),
+                           (unsigned long) start);
                  exit (1);
                }
              msglist[msgno++] = n;
diff --git a/mh/mh_whatnow.c b/mh/mh_whatnow.c
index 56551fa..d2bb3f0 100644
--- a/mh/mh_whatnow.c
+++ b/mh/mh_whatnow.c
@@ -73,7 +73,7 @@ static int
 print_short (const char *str)
 {
   int n;
-  char *s;
+  const char *s;
   
   for (n = 0; *str; str++, n++)
     {
@@ -113,12 +113,12 @@ print_short (const char *str)
 }
 
 static void
-print_descr (int n, char *s)
+print_descr (int n, const char *s)
 {
   do
     {
-      char *p;
-      char *space = NULL;
+      const char *p;
+      const char *space = NULL;
       
       for (; n < OPT_DOC_COL; n++)
        putchar (' ');
@@ -562,7 +562,7 @@ mh_whatnow (struct mh_whatnow_env *wh, int initial_edit)
     mh_spawnp (wh->editor, wh->file);
 
   if (!wh->prompt)
-    wh->prompt = _("What now?");
+    wh->prompt = (char*) _("What now?");
   
   return _whatnow (wh, whatnow_tab);
 }
@@ -586,7 +586,7 @@ mh_disposition (const char *filename)
   int rc;
   memset (&wh, 0, sizeof (wh));
   wh.file = xstrdup (filename);
-  wh.prompt = _("Disposition?");
+  wh.prompt = (char*) _("Disposition?");
   rc = _whatnow (&wh, disp_tab);
   free (wh.file);
   return rc;
diff --git a/mh/mhn.c b/mh/mhn.c
index 766b8fc..e763271 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -1064,7 +1064,7 @@ handle_message (mu_message_t msg, msg_part_t part, 
msg_handler_t fun, void *data
   mu_message_is_multipart (msg, &ismime);
   if (ismime)
     {
-      unsigned int i, nparts;
+      size_t i, nparts;
 
       mu_message_get_num_parts (msg, &nparts);
 
@@ -1391,7 +1391,7 @@ show_handler (mu_message_t msg, msg_part_t part, char 
*type, char *encoding,
       const char *p;
       size_t size = 0;
 
-      str = _("part ");
+      str = (char*) _("part ");
       mu_stream_sequential_write (out, str, strlen (str));
       str = msg_part_format (part);
       mu_stream_sequential_write (out, str, strlen (str));
diff --git a/mh/pick.y b/mh/pick.y
index 0553371..b13afcc 100644
--- a/mh/pick.y
+++ b/mh/pick.y
@@ -33,13 +33,16 @@ regex_dup (regex_t *re)
   return rp;
 }
 
+int yyerror (const char *s);
+int yylex (void); 
+ 
 static node_t *parse_tree;
 static int nesting_level;
 static int reg_flags = REG_EXTENDED|REG_ICASE;
 %}
 
 %token <string> T_COMP T_DATEFIELD  T_STRING T_CFLAGS
-%token T_LBRACE T_RBRACE T_BEFORE T_AFTER T_CFLAGS
+%token T_LBRACE T_RBRACE T_BEFORE T_AFTER 
 %left T_OR
 %left T_AND
 %left T_NOT
@@ -215,10 +218,10 @@ tokname (int tok)
 }
 
 int
-yyerror (char *s)
+yyerror (const char *s)
 {
   int tok = yylex ();
-  char *str;
+  const char *str;
   
   if (!tok)
     str = _("end of input");
diff --git a/mimeview/mimetypes.y b/mimeview/mimetypes.y
index 7e0a934..24e6ab8 100644
--- a/mimeview/mimetypes.y
+++ b/mimeview/mimetypes.y
@@ -607,8 +607,8 @@ make_functional_node (char *ident, mu_list_t list)
   {
     char *s;
     asprintf (&s,
-             _("argument %d has wrong type in call to `%s'"),
-             i, ident);
+             _("argument %lu has wrong type in call to `%s'"),
+             (unsigned long) i, ident);
     yyerror (s);
     free (s);
     return NULL;
diff --git a/python/libmu_py/debug.c b/python/libmu_py/debug.c
index aacf1de..78b5056 100644
--- a/python/libmu_py/debug.c
+++ b/python/libmu_py/debug.c
@@ -111,7 +111,7 @@ _capture_stdout (PyObject *self, PyObject *args)
     return NULL;
   if (_mu_prog_debug_stdout)
     mu_debug_printf (_mu_prog_debug_stdout, MU_DIAG_INFO, "%.*s",
-                    strlen (buf), buf);
+                    (int) strlen (buf), buf);
   return _ro (Py_None);
 }
 
@@ -123,7 +123,7 @@ _capture_stderr (PyObject *self, PyObject *args)
     return NULL;
   if (_mu_prog_debug_stderr)
     mu_debug_printf (_mu_prog_debug_stderr, MU_DIAG_ERROR, "%.*s",
-                    strlen (buf), buf);
+                    (int) strlen (buf), buf);
   return _ro (Py_None);
 }
 
diff --git a/sieve/sieve.c b/sieve/sieve.c
index e96a675..76b7c6c 100644
--- a/sieve/sieve.c
+++ b/sieve/sieve.c
@@ -342,7 +342,8 @@ _sieve_action_log (void *unused,
     }
   
   mu_message_get_uid (msg, &uid);
-  mu_diag_printf (MU_DIAG_NOTICE, _("%s on msg uid %d"), action, uid);
+  mu_diag_printf (MU_DIAG_NOTICE, _("%s on msg uid %lu"),
+                 action, (unsigned long) uid);
   
   if (fmt && strlen (fmt))
     {


hooks/post-receive
-- 
GNU Mailutils




reply via email to

[Prev in Thread] Current Thread [Next in Thread]