mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 02:53:33 +08:00
enable -Wlogical-op and fix bmi160
This commit is contained in:
committed by
Nuno Marques
parent
a031552756
commit
fb5cb87e9b
@@ -332,6 +332,7 @@ function(px4_add_common_flags)
|
|||||||
-Wfloat-equal
|
-Wfloat-equal
|
||||||
-Wformat-security
|
-Wformat-security
|
||||||
-Winit-self
|
-Winit-self
|
||||||
|
-Wlogical-op
|
||||||
-Wmissing-declarations
|
-Wmissing-declarations
|
||||||
-Wmissing-field-initializers
|
-Wmissing-field-initializers
|
||||||
#-Wmissing-include-dirs # TODO: fix and enable
|
#-Wmissing-include-dirs # TODO: fix and enable
|
||||||
@@ -361,7 +362,6 @@ function(px4_add_common_flags)
|
|||||||
list(APPEND warnings
|
list(APPEND warnings
|
||||||
-Wunused-but-set-variable
|
-Wunused-but-set-variable
|
||||||
-Wformat=1
|
-Wformat=1
|
||||||
#-Wlogical-op # very verbose due to eigen
|
|
||||||
-Wdouble-promotion
|
-Wdouble-promotion
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1131,7 +1131,7 @@ BMI160::measure()
|
|||||||
|
|
||||||
check_registers();
|
check_registers();
|
||||||
|
|
||||||
if ((!(status && (0x80))) && (!(status && (0x04)))) {
|
if ((!(status & (0x80))) && (!(status & (0x04)))) {
|
||||||
perf_end(_sample_perf);
|
perf_end(_sample_perf);
|
||||||
perf_count(_duplicates);
|
perf_count(_duplicates);
|
||||||
_got_duplicate = true;
|
_got_duplicate = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user