diff options
author | Geoff Levand <geoff@infradead.org> | 2015-03-18 23:04:03 +0000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-03-19 11:18:30 +0900 |
commit | 23a806695fa7f596397c5653ac832a2539211e67 (patch) | |
tree | 23bd796c4d5a64373faad37128a0ee28171fee95 /purgatory | |
parent | f9f98fd811fef94f4f794e1980246e94d3ab2097 (diff) | |
download | kexec-tools-23a806695fa7f596397c5653ac832a2539211e67.tar.gz |
purgatory: Add printf type checking
To better catch coding problems add stricter type checking to the
purgatory printf routines.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r-- | purgatory/include/purgatory.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/purgatory/include/purgatory.h b/purgatory/include/purgatory.h index ed50dc4..788ce49 100644 --- a/purgatory/include/purgatory.h +++ b/purgatory/include/purgatory.h @@ -2,8 +2,9 @@ #define PURGATORY_H void putchar(int ch); -void sprintf(char *buffer, const char *fmt, ...); -void printf(const char *fmt, ...); +void sprintf(char *buffer, const char *fmt, ...) + __attribute__ ((format (printf, 2, 3))); +void printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); void setup_arch(void); void post_verification_setup_arch(void); |