aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds/tests
diff options
context:
space:
mode:
authorDon Gagne <don@thegagnes.com>2014-07-06 16:51:06 -0700
committerDon Gagne <don@thegagnes.com>2014-07-06 16:51:06 -0700
commit2a79689224a381cf777c555d330f0a2aca8e3d9a (patch)
treecd896bc12d7db7c7eba5929d4576cbc920e782d0 /src/systemcmds/tests
parentd67089b23f58ac152253f58c5deaebbd57db0362 (diff)
downloadpx4-firmware-2a79689224a381cf777c555d330f0a2aca8e3d9a.tar.gz
px4-firmware-2a79689224a381cf777c555d330f0a2aca8e3d9a.tar.bz2
px4-firmware-2a79689224a381cf777c555d330f0a2aca8e3d9a.zip
Fix unused variable warnings
Diffstat (limited to 'src/systemcmds/tests')
-rw-r--r--src/systemcmds/tests/test_mathlib.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemcmds/tests/test_mathlib.cpp b/src/systemcmds/tests/test_mathlib.cpp
index 00c649c75..df3ddb966 100644
--- a/src/systemcmds/tests/test_mathlib.cpp
+++ b/src/systemcmds/tests/test_mathlib.cpp
@@ -96,8 +96,11 @@ int test_mathlib(int argc, char *argv[])
TEST_OP("Vector<3> %% Vector<3>", v1 % v2);
TEST_OP("Vector<3> length", v1.length());
TEST_OP("Vector<3> length squared", v1.length_squared());
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-variable"
TEST_OP("Vector<3> element read", volatile float a = v1(0));
TEST_OP("Vector<3> element read direct", volatile float a = v1.data[0]);
+#pragma GCC diagnostic pop
TEST_OP("Vector<3> element write", v1(0) = 1.0f);
TEST_OP("Vector<3> element write direct", v1.data[0] = 1.0f);
}