Use -Werror in hardware/libhardware/tests
* Remove unused local variables.
* Suppress warning of unused template functions.
* Fix error of unused expression value.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I5a37c24f3be0f61b0ae4552e34b7311f561d499e
diff --git a/tests/hardware/struct-size.cpp b/tests/hardware/struct-size.cpp
index 232b55d..14a26ef 100644
--- a/tests/hardware/struct-size.cpp
+++ b/tests/hardware/struct-size.cpp
@@ -24,7 +24,7 @@
#include <hardware/camera_common.h>
#include <hardware/camera3.h>
-template<size_t> static constexpr size_t CheckSizeHelper(size_t, size_t);
+template<size_t> static constexpr size_t CheckSizeHelper(size_t, size_t) __attribute((unused));
template<> constexpr size_t CheckSizeHelper<4>(size_t size32, size_t /* size64 */) {
return size32;