diff options
author | Don Gagne <don@thegagnes.com> | 2014-07-07 15:11:46 -0700 |
---|---|---|
committer | Don Gagne <don@thegagnes.com> | 2014-07-07 15:11:46 -0700 |
commit | 680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1 (patch) | |
tree | e2937f8482b15a271769ee4b8c6966ce6a2238e3 /src/systemcmds | |
parent | be73ad0bdb932e35cf891e8f5ffc1b89fdd683dc (diff) | |
download | px4-firmware-680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1.tar.gz px4-firmware-680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1.tar.bz2 px4-firmware-680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1.zip |
Fix compiler warnings
Diffstat (limited to 'src/systemcmds')
-rw-r--r-- | src/systemcmds/param/param.c | 1 | ||||
-rw-r--r-- | src/systemcmds/tests/test_mathlib.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/systemcmds/param/param.c b/src/systemcmds/param/param.c index 235ab7186..28e1b108b 100644 --- a/src/systemcmds/param/param.c +++ b/src/systemcmds/param/param.c @@ -231,7 +231,6 @@ do_show_print(void *arg, param_t param) /* start search */ const char *ss = search_string; const char *pp = p_name; - bool mismatch = false; /* XXX this comparison is only ok for trailing wildcards */ while (*ss != '\0' && *pp != '\0') { 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 |