Skip to content

Commit 09cad20

Browse files
nandojvecarlescufi
authored andcommitted
logging/log_core.h: Fix unused variable diagnose
The current _mode variable can be diagnosed as unused by tools like clang-tidy-14. This add a small fix to by pass this situation and allow run analysis tool without this warning/error. Signed-off-by: Gerson Fernando Budke <[email protected]>
1 parent 60bb584 commit 09cad20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/zephyr/logging/log_core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ static inline char z_log_minimal_level_to_char(int level)
240240
Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
241241
CONFIG_LOG_DOMAIN_ID, _src, _level, NULL,\
242242
0, __VA_ARGS__); \
243+
(void)_mode; \
243244
if (false) { \
244245
/* Arguments checker present but never evaluated.*/ \
245246
/* Placed here to ensure that __VA_ARGS__ are*/ \

0 commit comments

Comments
 (0)