oss-sec mailing list archives
Re: Retrospective by 'gpg.fail' authors
From: Werner Koch <wk () gnupg org>
Date: Thu, 17 Sep 2026 17:08:25 +0200
On Wed, 16 Sep 2026 13:06, Soatok Dreamseeker said:
Yes, sure. But 2003 was a different time and that part of the code was simply forgotten:So... why not delete it? Unmaintained code is a liability (and, categorically, forgotten about code is not being maintained).
By "forgotten" I meant that -Wformat-nonlietral was not anymore used to
that specific problem. The time string formatting is still required and
gcc actually provides a working method to disable warnings for a specific
function (or maybe even code lines).
GnuPG commit: 98871aadb70378343541128e80ffd391e413e248
+ * Note: gcc -Wformat-noliteral would complain here. Thus we disable
+ * it for this function. */
+#if defined(HAVE_STRFTIME) && defined(HAVE_NL_LANGINFO)
+# if GPGRT_HAVE_PRAGMA_GCC_PUSH
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+# endif
+static void
+format_time_nl_langinfo (char *buffer, size_t bufsize, struct tm *tp)
[...]
mycflags="$mycflags -W -Wno-sign-compare -Wno-format-zero-length"
+ mycflags="$mycflags -Wformat-nonliteral"
mycflags="$mycflags -Wno-missing-field-initializers"
Salam-Shalom,
Werner
--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Attachment:
openpgp-digital-signature.asc
Description:
Current thread:
- Retrospective by 'gpg.fail' authors Sam James (Sep 12)
- Re: Retrospective by 'gpg.fail' authors Peter Gutmann (Sep 13)
- Re: Retrospective by 'gpg.fail' authors Clemens Lang (Sep 14)
- Re: Retrospective by 'gpg.fail' authors Werner Koch (Sep 15)
- Re: Retrospective by 'gpg.fail' authors Sam James (Sep 15)
- Re: Retrospective by 'gpg.fail' authors Werner Koch (Sep 16)
- Re: Retrospective by 'gpg.fail' authors Soatok Dreamseeker (Sep 16)
- Re: Retrospective by 'gpg.fail' authors Peter Gutmann (Sep 16)
- Re: Removing dead code (was: Retrospective by 'gpg.fail' authors) Jacob Bachmeyer (Sep 17)
- Re: Removing dead code (was: Retrospective by 'gpg.fail' authors) Peter Gutmann (Sep 18)
- Re: Retrospective by 'gpg.fail' authors Werner Koch (Sep 15)
- Re: Retrospective by 'gpg.fail' authors Werner Koch (Sep 17)
