From abc3143ba1989a48f62246c2afb0eb4c3c5f7917 Mon Sep 17 00:00:00 2001 From: Peter Stuge Date: Thu, 22 Sep 2011 10:19:17 +0200 Subject: [PATCH] libusbi.h: Silence unused context variable warnings when not logging --- libusb/libusbi.h | 4 ++-- 1 file 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, -- 2.7.4