Add "do { } while (0)" to macros used to remove logging calls, to ensure there's no code structure change when enabling/disabling logging.
Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com> --- lib/power/power_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/power/power_common.h b/lib/power/power_common.h index 3f56b1103d..83a30858fe 100644 --- a/lib/power/power_common.h +++ b/lib/power/power_common.h @@ -20,7 +20,7 @@ extern int rte_power_logtype; #define POWER_DEBUG_LOG(...) \ RTE_LOG_LINE_PREFIX(ERR, POWER, "%s: ", __func__, __VA_ARGS__) #else -#define POWER_DEBUG_LOG(...) +#define POWER_DEBUG_LOG(...) do { } while (0) #endif /* check if scaling driver matches one we want */ -- 2.47.0.vfs.0.3