Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
wrigby
· 3y ago · 0 comments
Thanks! This prompted me to look up the flag to enable this. For GCC it’s:
-Werror=format-security
Comments
[–]
fay59
3y ago
The flag is -Wformat-nonliteral or -Wformat=2. -Wformat-security only includes a weaker variant that will warn if you pass a variable and no arguments to printf.