Skip to content

Commit

Permalink
include: toolchain: added missing parenthesis
Browse files Browse the repository at this point in the history
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <[email protected]>
  • Loading branch information
tychofrei02 authored and nashif committed Jun 14, 2024
1 parent c9d0f15 commit b29e8ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/zephyr/toolchain/gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#elif !defined(__cplusplus) && \
(((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))) || \
(__STDC_VERSION__) >= 201100)
#define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
#define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
#else
#define BUILD_ASSERT(EXPR, MSG...)
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/toolchain/mwdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
/* For cpp98 */
#define BUILD_ASSERT(EXPR, MSG...)
#else
#define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
#define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
#endif

#define __builtin_arc_nop() _nop()
Expand Down

0 comments on commit b29e8ff

Please sign in to comment.