[PATCH 1/2] Check format string of die()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use gcc's __attribute__ to check format string.

Signed-off-by: Aleksey Makarov <aleksey.makarov at gmail.com>
---
 kexec/kexec.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kexec/kexec.h b/kexec/kexec.h
index 279dfdf..d24b3fa 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -215,7 +215,8 @@ extern int file_types;
 
 #define KEXEC_OPT_STR "hvdfxluet:p"
 
-extern void die(char *fmt, ...);
+extern void die(char *fmt, ...)
+	__attribute__ ((format (printf, 1, 2)));
 extern void *xmalloc(size_t size);
 extern void *xrealloc(void *ptr, size_t size);
 extern char *slurp_file(const char *filename, off_t *r_size);
-- 
1.7.7.6




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux