[PATCH 4/4] purgatory: Add printf type checking

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

 



To better catch coding problems add stricter type checking to the
purgatory printf routines.

Signed-off-by: Geoff Levand <geoff at infradead.org>
---
 purgatory/include/purgatory.h | 5 +++--
 1 file 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);
 
-- 
2.1.0




[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