Re: Compile error in 3.0

Jordi Mallach <[email protected]>
Newsgroups gmane.comp.gnu.mailutils.bugs
Organization SinDominio
Message-ID <[email protected]>
On Mon, Dec 05, 2016 at 11:24:37AM +0100, Jordi Mallach wrote:
> Did you have a chance to test-compile using -Wformat-security? It's a
> default GCC option in quite a few distributions these days.

The attached trivial patch fixes this.

Additionally, I'm attaching some spelling fixes.

-- 
Jordi Mallach Pérez  --  Debian developer     http://www.debian.org/
[email protected]     [email protected]     http://www.sindominio.net/
GnuPG public key information available at http://oskuro.net/

_______________________________________________
Bug-mailutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-mailutils
0001-Fix-spelling-errors.patch (text/x-diff, 2.1 KB)
From d9b71362a7fd0726bde87f0d4a1b4ddb3accda4a Mon Sep 17 00:00:00 2001
From: Jordi Mallach <[email protected]>
Date: Fri, 9 Dec 2016 12:17:03 +0100
Subject: [PATCH 1/2] Fix spelling errors.

---
 examples/nntpclient.c | 2 +-
 imap4d/uid.c          | 2 +-
 mail/mailvar.c        | 2 +-
 mu/shell.c            | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/nntpclient.c b/examples/nntpclient.c
index 1e53b864..4b3da10b 100644
--- a/examples/nntpclient.c
+++ b/examples/nntpclient.c
@@ -953,7 +953,7 @@ com_info (char *arg)
 
   if (!printed)
     {
-      printf ("No commands match `%s'.  Possibilties are:\n", arg);
+      printf ("No commands match `%s'.  Possibilities are:\n", arg);
 
       for (i = 0; commands[i].name; i++)
 	{
diff --git a/imap4d/uid.c b/imap4d/uid.c
index 97f8088c..bc5d7b58 100644
--- a/imap4d/uid.c
+++ b/imap4d/uid.c
@@ -49,7 +49,7 @@ imap4d_uid (struct imap4d_session *session,
     rc = imap4d_search0 (tok, 1, &err_text);
   else
     {
-      err_text = "Uknown uid command";
+      err_text = "Unknown uid command";
       rc = RESP_BAD;
     }
   return io_completion_response (command, rc, "%s %s", cmd, err_text);
diff --git a/mail/mailvar.c b/mail/mailvar.c
index 803f32cc..4643620f 100644
--- a/mail/mailvar.c
+++ b/mail/mailvar.c
@@ -121,7 +121,7 @@ struct mailvar_symbol mailvar_tab[] =
       N_("input message is terminated with a dot alone on a line") },
     { { "editheaders", },
       MAILVAR_TYPEMASK (mailvar_type_boolean),
-      N_("allow to edit message headers while composing") },
+      N_("allow editting message headers while composing") },
     { { "emptystart", },
       MAILVAR_TYPEMASK (mailvar_type_boolean),
       N_("start interactive mode if the mailbox is empty") },
diff --git a/mu/shell.c b/mu/shell.c
index ff4bd055..276057bf 100644
--- a/mu/shell.c
+++ b/mu/shell.c
@@ -226,7 +226,7 @@ shell_help (int argc, char **argv)
 	print_comtab (mu_strout, com);
       else
 	{
-	  mu_printf ("No commands match `%s'.  Possibilties are:\n", name);
+	  mu_printf ("No commands match `%s'.  Possibilities are:\n", name);
 	  list_commands (shell_comtab, name);
 	}
     }
-- 
2.11.0
0002-Fix-build-when-building-with-Werror-Wformat-security.patch (text/x-diff, 737 B)
From 9510feb3d911fb9a8c2e9109d116ced9a2cceada Mon Sep 17 00:00:00 2001
From: Jordi Mallach <[email protected]>
Date: Fri, 9 Dec 2016 12:17:44 +0100
Subject: [PATCH 2/2] Fix build when building with -Werror -Wformat-security.

---
 libmailutils/string/wordsplit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmailutils/string/wordsplit.c b/libmailutils/string/wordsplit.c
index b570ccf1..bdf6d352 100644
--- a/libmailutils/string/wordsplit.c
+++ b/libmailutils/string/wordsplit.c
@@ -2335,7 +2335,7 @@ mu_wordsplit_perror (struct mu_wordsplit *wsp)
       break;
 
     default:
-      wsp->ws_error (mu_wordsplit_strerror (wsp));
+      wsp->ws_error ("%s", mu_wordsplit_strerror (wsp));
     }
 }
 
-- 
2.11.0
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6BdUhsApKYN8KGoWJVAvb8vjywQFAlhKnUUACgkQJVAvb8vj
ywT3VQ/+KwGgaUH1UxanhbSowm03OEe0cdcaiMmvF9JqzILf1pRFcrqvV41hGSJc
Eh29GNwfXSilxUcAxQNouHVZWEUSquJciINxRfcp/2+KCl9/Ey83EBrubahPAHKu
Sz+JufXX6crkT6PeiLqayUcwyq2ynyJzQFAmMlH+gITX6o3tq1CAasnx+oojLghp
OF7hGG96RcX/kHZzJaOuYRuz+nMCECJBJMKqp4mPa6cGu5QbL9zvJ+lacyqREjVN
pvWWq4DiLCtrm7ZmqGrpd1SH6NpPiEsMqrWAgozulgLpE1NW1HBrfY2gwRFOXDrF
HpCzO4I9IR/ywGUeaKT7iJ+RXHoOXqBl07FXBwA6mOfMRv8wkiebvwiCnANo++Tl
wa+Bee0whaQ1CG/8pFbRU9iS4k8JPXAEV5KXmSpr4jyJNjZ31sAbmRaZo2PV8J2H
VXU/d2yMe7WCRg8WJ14NMa4x1wZ7DgRnyNH0P3NXBQWHrr2ttQGZFcRyegWMJS0Q
NntDKUJnDL3HfXXiYDaZZKFpgf1i39fg/F4D0gzqKUou9fbjLFat4Xw9C/SACczk
TeSzY/fRakUGe/mQX3Aw70BvAL3D6TGGu/joTF8SkxkMPr4hXKqSwU22/W0evr81
Sxgj9oZPrt4Mwyv1sJkLukeql1/TZClaR+R9dHI5m7gyDuS6oU4=
=B0UA
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.