29 Sep 18:49
Debug build fails
From: Alan Jenkins <alan-jenkins <at> tuffmail.co.uk>
Subject: Debug build fails
Newsgroups: gmane.linux.hotplug.devel
Date: 2008-09-29 16:50:21 GMT
Subject: Debug build fails
Newsgroups: gmane.linux.hotplug.devel
Date: 2008-09-29 16:50:21 GMT
udevadm-info.c: In function ‘print_all_attributes’:
udevadm-info.c:65: error: ‘udev’ undeclared (first use in this function)
udevadm-info.c:65: error: (Each undeclared identifier is reported only once
udevadm-info.c:65: error: for each function it appears in.)
udevadm-info.c:72: error: ‘info’ undeclared (first use in this function)
The dbg() macro sucks. The disabled version should be an inline
function, so it catches these errors on normal builds.
Obviously the callers need to be fixed before this can be applied.
------------>
Allow compiler to check dbg() arguments on non-debug builds
Signed-off-by: Alan Jenkins <alan-jenkins <at> tuffmail.co.uk>
diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h
index 162b33a..8f84715 100644
--- a/udev/lib/libudev-private.h
+++ b/udev/lib/libudev-private.h
@@ -23,12 +23,17 @@
#include <syslog.h>
#include "libudev.h"
+static inline void __attribute__ ((format(printf, 2, 3)))
+log_null(struct udev *udev, const char *format, ...)
+{
+}
+
(Continue reading)
RSS Feed