diff --git a/source/opt/log.h b/source/opt/log.h index cb64b0a82a..4de6dea703 100644 --- a/source/opt/log.h +++ b/source/opt/log.h @@ -49,7 +49,9 @@ #if !defined(NDEBUG) && defined(SPIRV_LOG_DEBUG) #define SPIRV_DEBUG(consumer, ...) SPIRV_DEBUG_IMPL(consumer, __VA_ARGS__) #else -#define SPIRV_DEBUG(consumer, ...) +// Adding a use to avoid errors in the release build related to unused +// consumers. +#define SPIRV_DEBUG(consumer, ...) (void)(consumer) #endif // Helper macros for concatenating arguments.