From 079a9c8229692c8c68899a9ab06693f830c1a091 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Thu, 9 Jan 2014 16:42:19 -0500 Subject: Add more _printf_'s for format-nonliterals Clang is a bit more strict wrt format-nonliterals: http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking Adding these extra printf attributes also makes gcc able to find more problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c Some parts looked intetional about breaking the format-nonliteral check. I added some supression for warnings there. Signed-off-by: Anthony G. Basile --- src/udev/udev-builtin-path_id.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/udev/udev-builtin-path_id.c') diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c index da0273197b..f85b091763 100644 --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -32,6 +32,7 @@ #include "udev.h" +_printf_(2,3) static int path_prepend(char **path, const char *fmt, ...) { va_list va; -- cgit v1.2.3-54-g00ecf