diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2008-09-29 17:50:21 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-29 18:54:21 +0200 |
commit | 9176ac1f4e42f71df692773651898100b253774c (patch) | |
tree | eebe70b5df8c61e11f00dc49cfec66077feadc66 /udev/lib/libudev-private.h | |
parent | 120ff8a0e8666b9be84fbd1c22ceeef1b1bd0158 (diff) |
allow compiler to check dbg() arguments on non-debug builds
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Diffstat (limited to 'udev/lib/libudev-private.h')
-rw-r--r-- | udev/lib/libudev-private.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h index 162b33aef6..8f847158b2 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, ...) +{ +} + #ifdef USE_LOG #ifdef USE_DEBUG #define dbg(udev, arg...) \ udev_log(udev, LOG_DEBUG, __FILE__, __LINE__, __FUNCTION__, ## arg) #else -#define dbg(format, arg...) do { } while (0) +#define dbg log_null #endif /* USE_DEBUG */ #define info(udev, arg...) \ @@ -37,9 +42,9 @@ #define err(udev, arg...) \ udev_log(udev, LOG_ERR, __FILE__, __LINE__, __FUNCTION__, ## arg) #else -#define dbg(format, arg...) do { } while (0) -#define info(format, arg...) do { } while (0) -#define err(format, arg...) do { } while (0) +#define dbg log_null +#define info log_null +#define err log_null #endif /* libudev */ |