Skip to content

Commit e83459d

Browse files
committed
tests: logging/log_syst: fix unused var warnings
When CONFIG_ZTEST_ASSERT_VERBOS is disabled, syst_headers_name[] is not exactly being used by zassert_mem_equal(). Mark it as __used to avoid compiler warnings. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
1 parent 196388d commit e83459d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/subsys/logging/log_syst/src/mock_backend.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ void validate_msg(const char *type, const char *optional_flags,
6363
const char *raw_data_str = "SYS-T RAW DATA: ";
6464
const char *output_str = test_output_buf;
6565
const char *syst_format_headers[4] = {type, optional_flags, module_id, sub_type};
66-
const char *syst_headers_name[4] = {"type", "optional_flags", "module_id", "sub_type"};
66+
const char *syst_headers_name[4] __used = {"type", "optional_flags", "module_id",
67+
"sub_type"};
6768

6869
/* Validate "SYS-T RAW DATA: " prefix in the output_str */
6970
zassert_mem_equal(raw_data_str, output_str, strlen(raw_data_str),

0 commit comments

Comments
 (0)