home · contact · privacy
Added -Wformat-security to gcc options, fixed point found by it.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 24 Mar 2014 20:22:33 +0000 (21:22 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 24 Mar 2014 20:22:33 +0000 (21:22 +0100)
Makefile
src/client/keybindings.c

index 6a6fe5b7a9fdd537a74a5c49d9904a87bb187768..063bf2f08562f8afae1b0d15d10664d30ab3baa3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-Wall -Wextra -Werror -g
+CFLAGS=-Wall -Wextra -Werror -Wformat-security -g
 TARGET_SERVER=roguelike-server
 TARGET_CLIENT=roguelike-client
 SRCDIR=src
index f148afa3371744a0c804ce84266bfb1858589f7d..b23a47efab871cb75449f9d980be9df1d564e22c 100644 (file)
@@ -57,7 +57,7 @@ static uint8_t try_keycode(uint16_t keycode_given, char * keyname,
 {
     if (keycode_given == keycode_match)
     {
-        sprintf(keyname, keyname_match);
+        sprintf(keyname, "%s", keyname_match);
         return 1;
     }
     return 0;