Skip to content

Commit befcb80

Browse files
tests: lib: cpp: add __maybe_unused to unused variable
The foos variable is not really used. Add __maybe_unused to silence compiler. Signed-off-by: Dawid Niedzwiecki <[email protected]>
1 parent 6f9d3bd commit befcb80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/lib/cpp/cxx/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ struct foo {
9999
/* Check that BUILD_ASSERT compiles. */
100100
BUILD_ASSERT(sizeof(foo) == sizeof(int));
101101

102-
static struct foo foos[5];
102+
__maybe_unused static struct foo foos[5];
103103
/* Check that ARRAY_SIZE compiles. */
104104
BUILD_ASSERT(ARRAY_SIZE(foos) == 5, "expected 5 elements");
105105

0 commit comments

Comments
 (0)