diff --git a/Makefile b/Makefile index abe9c8f342..8dc03b27de 100755 --- a/Makefile +++ b/Makefile @@ -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` diff --git a/src/modules/commander/accelerometer_calibration.cpp b/src/modules/commander/accelerometer_calibration.cpp index ae9925eff6..d6e79e2462 100644 --- a/src/modules/commander/accelerometer_calibration.cpp +++ b/src/modules/commander/accelerometer_calibration.cpp @@ -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) {