aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds/tests/test_mathlib.cpp
diff options
context:
space:
mode:
authorDon Gagne <don@thegagnes.com>2014-07-07 15:11:46 -0700
committerDon Gagne <don@thegagnes.com>2014-07-07 15:11:46 -0700
commit680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1 (patch)
treee2937f8482b15a271769ee4b8c6966ce6a2238e3 /src/systemcmds/tests/test_mathlib.cpp
parentbe73ad0bdb932e35cf891e8f5ffc1b89fdd683dc (diff)
downloadpx4-firmware-680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1.tar.gz
px4-firmware-680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1.tar.bz2
px4-firmware-680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1.zip
Fix compiler warnings
Diffstat (limited to 'src/systemcmds/tests/test_mathlib.cpp')
-rw-r--r--src/systemcmds/tests/test_mathlib.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemcmds/tests/test_mathlib.cpp b/src/systemcmds/tests/test_mathlib.cpp
index df3ddb966..70d173fc9 100644
--- a/src/systemcmds/tests/test_mathlib.cpp
+++ b/src/systemcmds/tests/test_mathlib.cpp
@@ -98,6 +98,8 @@ int test_mathlib(int argc, char *argv[])
TEST_OP("Vector<3> length squared", v1.length_squared());
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
+ // Need pragma here intead of moving variable out of TEST_OP and just reference because
+ // TEST_OP measures performance of vector operations.
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