diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-12-16 13:06:22 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-12-16 13:06:22 +0200 |
commit | a600395e1fe66e0a116827f17f9bd864d4554585 (patch) | |
tree | 42c1d775613364dd2eacb96712f20ee3ce8d7401 /examples | |
parent | 96dc9ab99e9518f5f21a7710e396da8c3fd833b5 (diff) | |
download | mailutils-a600395e1fe66e0a116827f17f9bd864d4554585.tar.gz mailutils-a600395e1fe66e0a116827f17f9bd864d4554585.tar.bz2 |
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
Diffstat (limited to 'examples')
-rw-r--r-- | examples/header.c | 4 | ||||
-rw-r--r-- | examples/mailcap.c | 5 | ||||
-rw-r--r-- | examples/pop3client.c | 9 | ||||
-rw-r--r-- | examples/url-parse.c | 4 |
4 files changed, 12 insertions, 10 deletions
diff --git a/examples/header.c b/examples/header.c index 84e9454b7..d9b015aee 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 fb0a4f329..4f5c57c6f 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 a4040384d..2c2199ebb 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 d1a35c4af..efddda6d4 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 |