Makefile add scan-build target

This commit is contained in:
Daniel Agar 2017-01-01 22:42:01 -05:00 committed by Lorenz Meier
parent dc9a71b674
commit 5ec546f735
2 changed files with 7 additions and 1 deletions

View File

@ -295,6 +295,12 @@ tests_coverage:
test_startup_shutdown:
@$(call PX4_RUN,$(MAKE) --no-print-directory posix_sitl_test gazebo_standard_vtol HEADLESS=1 MEMORY_DEBUG=1)
scan-build:
export CCACHE_DISABLE=1
mkdir -p $(SRC_DIR)/build_posix_sitl_default_scan-build
cd $(SRC_DIR)/build_posix_sitl_default_scan-build && scan-build cmake .. -GNinja -DCONFIG=posix_sitl_default
scan-build cmake --build $(SRC_DIR)/build_posix_sitl_default_scan-build
package_firmware:
@zip --junk-paths Firmware.zip `find Binaries/. -name \*.px4`

View File

@ -242,7 +242,7 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
float accel_offs[max_accel_sens][3];
float accel_T[max_accel_sens][3][3];
unsigned active_sensors;
unsigned active_sensors = 0;
/* measure and calculate offsets & scales */
if (res == PX4_OK) {