mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 21:43:34 +08:00
Fix compiler warnings
This commit is contained in:
@@ -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') {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user