Mark variables as unused.
clang is smart enough to notice a variable is set but not used,
but these variable are used for testing purposes. Mark one as
unused, and convert the other to a DoNotOptimize.
Bug: 197240255
Test: Compiles without warnings.
Test: Ran unit tests on coral hwasan build.
Change-Id: Ibc873e477355a702579e5a680780c77db0c58046
diff --git a/tests/sys_ttydefaults_test.cpp b/tests/sys_ttydefaults_test.cpp
index fa4f7c7..73aa448 100644
--- a/tests/sys_ttydefaults_test.cpp
+++ b/tests/sys_ttydefaults_test.cpp
@@ -20,7 +20,7 @@
#include <termios.h>
TEST(sys_ttydefaults, flags) {
- int i;
+ [[maybe_unused]] int i;
i = TTYDEF_IFLAG;
i = TTYDEF_OFLAG;
i = TTYDEF_LFLAG;