diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-06-04 23:20:21 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-06-04 23:20:21 +0000 |
commit | 9f5f2158a743fc2d7de63c05d38d8133c6b4d15d (patch) | |
tree | ea4bbb6158dd337b600e537a4b139004c5ff527c /flash.h | |
parent | b5b161b260b119d90a7f22e1c8ec1174de5eacf9 (diff) | |
download | flashrom-9f5f2158a743fc2d7de63c05d38d8133c6b4d15d.tar.gz flashrom-9f5f2158a743fc2d7de63c05d38d8133c6b4d15d.tar.bz2 flashrom-9f5f2158a743fc2d7de63c05d38d8133c6b4d15d.zip |
Gcc and clang can check format strings of printf-like functions
Since we don't support any other compilers right now, enable that
extension unconditionally.
Fix the bugs found by format string checking.
Corresponding to flashrom svn r1032.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'flash.h')
-rw-r--r-- | flash.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -591,7 +591,8 @@ int doit(struct flashchip *flash, int force, char *filename, int read_it, int wr #define NT 1 /* Not tested */ /* cli_output.c */ -int print(int type, const char *fmt, ...); +/* Let gcc and clang check for correct printf-style format strings. */ +int print(int type, const char *fmt, ...) __attribute__((format(printf, 2, 3))); #define MSG_ERROR 0 #define MSG_INFO 1 #define MSG_DEBUG 2 |