summaryrefslogtreecommitdiff
path: root/src/test/test-libudev.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-12-14 13:09:07 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-12-14 13:32:22 +0100
commit9091e686f43184065381aa71929e3df36a4ea2e1 (patch)
tree37fe0c888a655bcf2d976411f21c068c300abbae /src/test/test-libudev.c
parent8d35dae708ffbb88f1b023964913d3d53d4a7418 (diff)
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.
Diffstat (limited to 'src/test/test-libudev.c')
-rw-r--r--src/test/test-libudev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c
index 7ed4e14701..a8c1ff012a 100644
--- a/src/test/test-libudev.c
+++ b/src/test/test-libudev.c
@@ -34,6 +34,7 @@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+_printf_(6,0)
static void log_fn(struct udev *udev,
int priority, const char *file, int line, const char *fn,
const char *format, va_list args) {