* [committed] Fix Wformat-security warning
@ 2019-01-01 0:00 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz, jakub
Hi,
When compiling using make CC=clang, we run into:
...
dwz.c:13819:16: warning: format string is not a string literal \
(potentially insecure)
[-Wformat-security]
error (0, 0, msg);
^~~
dwz.c:13819:16: note: treat the string as an argument to avoid this
error (0, 0, msg);
^
"%s",
...
Fix the warning by making the format string a string literal, as suggested.
Committed to trunk.
Thanks,
- Tom
Fix Wformat-security warning
2019-12-17 Tom de Vries <tdevries@suse.de>
* dwz.c (usage): Fix Wformat-security warning.
---
dwz.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dwz.c b/dwz.c
index 48833bc..524cd6f 100644
--- a/dwz.c
+++ b/dwz.c
@@ -13816,7 +13816,7 @@ usage (void)
" dwz [common options] [-h] [-m COMMONFILE] [-M NAME | -r] [FILES]\n"
" dwz [common options] -o OUTFILE FILE\n"
" dwz [ -v | -? ]");
- error (0, 0, msg);
+ error (0, 0, "%s", msg);
indent = 30;
limit = 80;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-17 12:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [committed] Fix Wformat-security warning Tom de Vries
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).