diff options
author | Peter Stuge <peter@stuge.se> | 2011-09-22 10:19:17 +0200 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2011-10-17 16:25:51 +0200 |
commit | abc3143ba1989a48f62246c2afb0eb4c3c5f7917 (patch) | |
tree | caf1508a6f0bb1c446a29d17f7db511771a08490 | |
parent | 69b71c896a153a307360cf21be67b3b6e1e09a2d (diff) |
libusbi.h: Silence unused context variable warnings when not logging
-rw-r--r-- | libusb/libusbi.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libusb/libusbi.h b/libusb/libusbi.h index f1b12d0..fe9b7af 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -132,7 +132,7 @@ void usbi_log(struct libusb_context *ctx, enum usbi_log_level level, #ifdef ENABLE_LOGGING #define _usbi_log(ctx, level, ...) usbi_log(ctx, level, __FUNCTION__, __VA_ARGS__) #else -#define _usbi_log(ctx, level, ...) do {} while(0) +#define _usbi_log(ctx, level, ...) do { (void)(ctx); } while(0) #endif #ifdef ENABLE_DEBUG_LOGGING @@ -159,7 +159,7 @@ void usbi_log_v(struct libusb_context *ctx, enum usbi_log_level level, va_end(args); \ } #else -#define LOG_BODY(ctxt, level) { } +#define LOG_BODY(ctxt, level) do { (void)(ctxt); } while(0) #endif static inline void usbi_info(struct libusb_context *ctx, const char *format, |