]> err.no Git - systemd/commitdiff
volume_id: add dbg() as noop to check for compile errors
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 3 Oct 2008 12:50:57 +0000 (14:50 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 3 Oct 2008 12:50:57 +0000 (14:50 +0200)
extras/volume_id/lib/libvolume_id-private.h
udev/lib/exported_symbols

index 2ce46502c42b4d7824f584f594b3c4432aa27659..3326bf371289d16b39f6720374b6689f1d2071e8 100644 (file)
 #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)
index ff7efeaf752d7e5ba68d1004183af50131d66a65..2574d13e67081ef1a69fa3d076b8edade796bb8b 100644 (file)
@@ -1,7 +1,6 @@
 udev_new
 udev_ref
 udev_unref
-udev_log
 udev_set_log_fn
 udev_get_log_priority
 udev_set_log_priority