From 87878b20a53ea25697cf35369a7a30174ecbd115 Mon Sep 17 00:00:00 2001 From: "sander.hagendoorn" Date: Sun, 2 Jan 2022 17:54:54 +0100 Subject: [PATCH] Regards #77: MISRA C:2004 Rule 19.10: In the definition of a function-like macro each instance of a parameter shall be enclosed in parentheses unless it is used as the operand of `#` or `##`. --- src/printf/printf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/printf/printf.h b/src/printf/printf.h index 7d203d2e..912d9eeb 100644 --- a/src/printf/printf.h +++ b/src/printf/printf.h @@ -51,9 +51,9 @@ extern "C" { #ifdef __GNUC__ # define ATTR_PRINTF(one_based_format_index, first_arg) \ __attribute__((format(__printf__, (one_based_format_index), (first_arg)))) -# define ATTR_VPRINTF(one_based_format_index) ATTR_PRINTF(one_based_format_index, 0) +# define ATTR_VPRINTF(one_based_format_index) ATTR_PRINTF((one_based_format_index), 0) #else -# define ATTR_PRINTF(one_based_format_index, first_arg) +# define ATTR_PRINTF((one_based_format_index), (first_arg)) # define ATTR_VPRINTF(one_based_format_index) #endif