From 3ab8ebf572cced0a63f8ba915d8494ef1784803d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 3 Oct 2008 14:50:57 +0200 Subject: [PATCH] volume_id: add dbg() as noop to check for compile errors --- extras/volume_id/lib/libvolume_id-private.h | 5 ++++- udev/lib/exported_symbols | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extras/volume_id/lib/libvolume_id-private.h b/extras/volume_id/lib/libvolume_id-private.h index 2ce46502..3326bf37 100644 --- a/extras/volume_id/lib/libvolume_id-private.h +++ b/extras/volume_id/lib/libvolume_id-private.h @@ -34,12 +34,15 @@ #define PACKED __attribute__((packed)) #endif +static inline void __attribute__ ((format(printf, 1, 2))) +log_null(const char *format, ...) {} + #define err(format, arg...) volume_id_log_fn(LOG_ERR, __FILE__, __LINE__, format, ##arg) #define info(format, arg...) volume_id_log_fn(LOG_INFO, __FILE__, __LINE__, format, ##arg) #ifdef DEBUG #define dbg(format, arg...) volume_id_log_fn(LOG_DEBUG, __FILE__, __LINE__, format, ##arg) #else -#define dbg(format, arg...) do { } while (0) +#define dbg(format, arg...) log_null(format, ##arg) #endif #if (__BYTE_ORDER == __LITTLE_ENDIAN) diff --git a/udev/lib/exported_symbols b/udev/lib/exported_symbols index ff7efeaf..2574d13e 100644 --- a/udev/lib/exported_symbols +++ b/udev/lib/exported_symbols @@ -1,7 +1,6 @@ udev_new udev_ref udev_unref -udev_log udev_set_log_fn udev_get_log_priority udev_set_log_priority -- 2.39.5