From: Thomas Gummerer <t.gummerer@gmail.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Thomas Gummerer <t.gummerer@gmail.com>
Subject: [PATCH] config.mak.dev: add -Wformat
Date: Fri, 12 Oct 2018 19:40:37 +0100 [thread overview]
Message-ID: <20181012184037.15076-1-t.gummerer@gmail.com> (raw)
801fa63a90 ("config.mak.dev: add -Wformat-security", 2018-09-08) added
the -Wformat-security to the flags set in config.mak.dev. In the gcc
man page this is documented as:
If -Wformat is specified, also warn about uses of format
functions that represent possible security problems. [...]
That commit did however not add the -Wformat flag, and -Wformat is not
specified anywhere else by default, so the added -Wformat-security had
no effect. Newer versions of gcc (gcc 8.2.1 in this particular case)
warn about this and thus compilation fails with this option set.
Fix that, and make -Wformat-security actually useful by adding the
-Wformat flag as well. git compiles cleanly with both these flags
applied.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
Sorry for not catching this before the patch made it to next.
config.mak.dev | 1 +
1 file changed, 1 insertion(+)
diff --git a/config.mak.dev b/config.mak.dev
index 92d268137f..bf6f943452 100644
--- a/config.mak.dev
+++ b/config.mak.dev
@@ -7,6 +7,7 @@ CFLAGS += -pedantic
CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=0
endif
CFLAGS += -Wdeclaration-after-statement
+CFLAGS += -Wformat
CFLAGS += -Wformat-security
CFLAGS += -Wno-format-zero-length
CFLAGS += -Wold-style-definition
--
2.19.1.937.g12227c8702.dirty
next reply other threads:[~2018-10-12 18:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 18:40 Thomas Gummerer [this message]
2018-10-12 18:45 ` [PATCH] config.mak.dev: add -Wformat Jeff King
2018-10-12 18:54 ` Jonathan Nieder
2018-10-12 19:11 ` Jeff King
2018-10-12 19:15 ` Thomas Gummerer
2018-12-27 18:59 ` Jonathan Nieder
2019-01-03 16:55 ` Junio C Hamano
2019-01-03 18:54 ` Jonathan Nieder
2019-01-06 18:17 ` Thomas Gummerer
2019-01-07 17:04 ` Junio C Hamano
2019-01-07 21:16 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181012184037.15076-1-t.gummerer@gmail.com \
--to=t.gummerer@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).