aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-07-08 07:32:36 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-07-08 07:32:36 +0200
commit512584ed750d58e2f87c509ebe7f4cf36984ac3d (patch)
tree232e9b26a3014f777f0926ceeb76f0954a66f208 /src/systemcmds
parent103b129f0d48bf84b6161a4b55cb8dd649b8c903 (diff)
parent680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1 (diff)
downloadpx4-firmware-512584ed750d58e2f87c509ebe7f4cf36984ac3d.tar.gz
px4-firmware-512584ed750d58e2f87c509ebe7f4cf36984ac3d.tar.bz2
px4-firmware-512584ed750d58e2f87c509ebe7f4cf36984ac3d.zip
Merge pull request #1145 from DonLakeFlyer/MoreWarnings
Fix compiler warnings
Diffstat (limited to 'src/systemcmds')
-rw-r--r--src/systemcmds/param/param.c1
-rw-r--r--src/systemcmds/tests/test_mathlib.cpp2
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