Skip to content

Commit

Permalink
Regards mpaland#77: MISRA C:2004 Rule 19.10: In the definition of a f…
Browse files Browse the repository at this point in the history
…unction-like macro each instance of a parameter shall be enclosed in parentheses unless it is used as the operand of `#` or `##`.
  • Loading branch information
sander.hagendoorn authored and eyalroz committed Feb 21, 2022
1 parent 944d240 commit 87878b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/printf/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 87878b2

Please sign in to comment.