diff options
author | 2013-12-21 06:54:53 +0000 | |
---|---|---|
committer | 2013-12-21 06:54:53 +0000 | |
commit | 4247594d0564f71c5c828ff65e7c997080487753 (patch) | |
tree | 190ae0ec1120bd9680c429af90a4b78416fe56c7 | |
parent | Constipate some functions (diff) | |
download | wireguard-openbsd-4247594d0564f71c5c828ff65e7c997080487753.tar.xz wireguard-openbsd-4247594d0564f71c5c828ff65e7c997080487753.zip |
Don't use a non-constant format string with printf() that gcc can't
figure out how to trust. Shuts up gcc -Wformat=2
ok deraadt@
-rw-r--r-- | usr.bin/radioctl/radioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/radioctl/radioctl.c b/usr.bin/radioctl/radioctl.c index 4b903d59a47..f9a16b7c27c 100644 --- a/usr.bin/radioctl/radioctl.c +++ b/usr.bin/radioctl/radioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radioctl.c,v 1.18 2013/11/26 19:25:38 deraadt Exp $ */ +/* $OpenBSD: radioctl.c,v 1.19 2013/12/21 06:54:53 guenther Exp $ */ /* $RuOBSD: radioctl.c,v 1.4 2001/10/20 18:09:10 pva Exp $ */ /* @@ -402,7 +402,7 @@ str_to_int(char *str, int optval) */ int parse_opt(char *s, struct opt_t *o) { - const char *badvalue = "bad value `%s'"; + static const char badvalue[] = "bad value `%s'"; char *topt = NULL; int slen, optlen; @@ -516,13 +516,13 @@ print_value(int optval, int show_choices) printf("%umkV", ri.lock); break; case OPTION_MUTE: - printf(ri.mute ? onchar : offchar); + printf("%s", ri.mute ? onchar : offchar); break; case OPTION_MONO: - printf(ri.stereo ? offchar : onchar); + printf("%s", ri.stereo ? offchar : onchar); break; case OPTION_STEREO: - printf(ri.stereo ? onchar : offchar); + printf("%s", ri.stereo ? onchar : offchar); break; case OPTION_CHANNEL: printf("%u", ri.chan); |