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 <dawidn@google.com>
This commit is contained in:
Dawid Niedzwiecki 2024-08-06 11:11:26 +02:00 committed by Henrik Brix Andersen
commit befcb801b4

View file

@ -99,7 +99,7 @@ struct foo {
/* Check that BUILD_ASSERT compiles. */
BUILD_ASSERT(sizeof(foo) == sizeof(int));
static struct foo foos[5];
__maybe_unused static struct foo foos[5];
/* Check that ARRAY_SIZE compiles. */
BUILD_ASSERT(ARRAY_SIZE(foos) == 5, "expected 5 elements");