Skip to contentSkip to conversation

Specify -Wformat along with -Wformat-security

PATCH In review Masaya Suzuki 2 participants 3 messages Dec 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Specify -Wformat along with -Wformat-security

Without -Wformat, -Wformat-security won't work.

Quoted 1 line

cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]

---
 config.mak.dev | 1 +
 1 file changed, 1 insertion(+)
config.mak.dev +1 -0
index bbeeff44f..aae9db67d 100644
@@ -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
Signature · 1 line
2.20.1.415.g653613c723-goog
#1 lore raw
Quoted 4 lines · Masaya Suzuki

Without -Wformat, -Wformat-security won't work.

Quoted 1 line

cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]

Compiler name and version?

Quoted 21 lines
---
 config.mak.dev | 1 +
 1 file changed, 1 insertion(+)
config.mak.dev +1 -1
index bbeeff44f..aae9db67d 100644
@@ -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.20.1.415.g653613c723-goog

Signature · 1 line
Duy
#2 lore raw
Quoted 8 lines · Duy Nguyen
Quoted 4 lines · Masaya Suzuki

Without -Wformat, -Wformat-security won't work.

Quoted 1 line

cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]

Compiler name and version?

I'm not familar with the tools, so please be patient.

According to Makefile, CC = cc. With cc --version, it says:

cc (Debian 7.3.0-5) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Jonathan said there was the same patch. Looks like
https://public-inbox.org/git/[email protected]/.
I'll check my config again.