mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:08:52 +08:00
remove Wpacked and cleanup unused warning flags
This commit is contained in:
committed by
Lorenz Meier
parent
f58596bbcd
commit
2487dbfc92
@@ -597,7 +597,6 @@ function(px4_add_common_flags)
|
||||
-Wall
|
||||
-Werror
|
||||
-Wextra
|
||||
-Wpacked
|
||||
-Wno-sign-compare
|
||||
-Wshadow
|
||||
-Wfloat-equal
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN px4flow
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Wno-attributes
|
||||
-Os
|
||||
SRCS
|
||||
px4flow.cpp
|
||||
|
||||
@@ -35,8 +35,6 @@ px4_add_module(
|
||||
MAIN snapdragon_rc_pwm
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
SRCS
|
||||
snapdragon_rc_pwm.cpp
|
||||
DEPENDS
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN uart_esc
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
-Wno-packed
|
||||
SRCS
|
||||
uart_esc.cpp
|
||||
DEPENDS
|
||||
|
||||
@@ -11,7 +11,7 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
|
||||
|
||||
FASTRPC_STUB_GEN(../qurt/px4muorb.idl)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes -Wno-missing-declarations")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
LINUX_APP(
|
||||
APP_NAME mainapp
|
||||
IDL_NAME px4muorb
|
||||
|
||||
@@ -36,8 +36,6 @@ px4_add_module(
|
||||
STACK_MAIN 4096
|
||||
STACK_MAX 2450
|
||||
COMPILE_FLAGS
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS
|
||||
commander.cpp
|
||||
|
||||
@@ -36,11 +36,7 @@ px4_add_module(
|
||||
STACK_MAIN 1200
|
||||
STACK_MAX 1500
|
||||
COMPILE_FLAGS
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-DMAVLINK_COMM_NUM_BUFFERS=4
|
||||
-Wno-packed
|
||||
-Wno-tautological-constant-out-of-range-compare
|
||||
-Os
|
||||
SRCS
|
||||
mavlink.c
|
||||
|
||||
@@ -36,9 +36,6 @@ px4_add_module(
|
||||
STACK_MAIN 5000
|
||||
COMPILE_FLAGS
|
||||
-DMAVLINK_FTP_UNIT_TEST
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS
|
||||
mavlink_tests.cpp
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN navigator
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Wno-sign-compare
|
||||
-Os
|
||||
SRCS
|
||||
navigator_main.cpp
|
||||
|
||||
@@ -131,7 +131,7 @@ private:
|
||||
control::BlockParamInt _param_max_hor_distance;
|
||||
control::BlockParamInt _param_max_ver_distance;
|
||||
|
||||
unsigned _outside_counter;
|
||||
int _outside_counter;
|
||||
|
||||
bool inside(double lat, double lon, float altitude);
|
||||
bool inside(const struct vehicle_global_position_s &global_position);
|
||||
|
||||
@@ -1149,7 +1149,7 @@ Mission::reset_offboard_mission(struct mission_s &mission)
|
||||
if (mission.count > 0) {
|
||||
dm_item_t dm_current = DM_KEY_WAYPOINTS_OFFBOARD(mission.dataman_id);
|
||||
|
||||
for (int index = 0; index < mission.count; index++) {
|
||||
for (unsigned index = 0; index < mission.count; index++) {
|
||||
struct mission_item_s item;
|
||||
const ssize_t len = sizeof(struct mission_item_s);
|
||||
|
||||
|
||||
@@ -35,9 +35,8 @@ px4_add_module(
|
||||
MODULE modules__sensors
|
||||
MAIN sensors
|
||||
PRIORITY "SCHED_PRIORITY_MAX-5"
|
||||
STACK_MAIN 1200
|
||||
STACK_MAIN 1300
|
||||
COMPILE_FLAGS
|
||||
-Wno-type-limits
|
||||
-O3
|
||||
SRCS
|
||||
sensors.cpp
|
||||
|
||||
@@ -1945,7 +1945,7 @@ Sensors::rc_poll()
|
||||
if (_parameters.rc_map_flightmode > 0) {
|
||||
|
||||
/* the number of valid slots equals the index of the max marker minus one */
|
||||
const unsigned num_slots = manual_control_setpoint_s::MODE_SLOT_MAX;
|
||||
const int num_slots = manual_control_setpoint_s::MODE_SLOT_MAX;
|
||||
|
||||
/* the half width of the range of a slot is the total range
|
||||
* divided by the number of slots, again divided by two
|
||||
|
||||
@@ -40,9 +40,6 @@ px4_add_module(
|
||||
MODULE modules__simulator
|
||||
MAIN simulator
|
||||
COMPILE_FLAGS
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-Wno-packed
|
||||
SRCS
|
||||
${SIMULATOR_SRCS}
|
||||
DEPENDS
|
||||
|
||||
@@ -80,8 +80,6 @@ px4_add_module(
|
||||
MODULE modules__systemlib
|
||||
COMPILE_FLAGS
|
||||
-Wno-sign-compare
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS ${SRCS}
|
||||
DEPENDS
|
||||
|
||||
@@ -173,7 +173,7 @@ param_assert_locked(void)
|
||||
static bool
|
||||
handle_in_range(param_t param)
|
||||
{
|
||||
int count = get_param_info_count();
|
||||
unsigned count = get_param_info_count();
|
||||
return (count && param < count);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,6 @@ px4_add_module(
|
||||
STACK_MAIN 3200
|
||||
STACK_MAX 1500
|
||||
COMPILE_FLAGS
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-Wno-deprecated-declarations
|
||||
-Os
|
||||
SRCS
|
||||
# Main
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE platforms__posix__drivers__accelsim
|
||||
MAIN accelsim
|
||||
COMPILE_FLAGS
|
||||
-Wno-packed
|
||||
SRCS
|
||||
accelsim.cpp
|
||||
DEPENDS
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE platforms__posix__drivers__airspeedsim
|
||||
MAIN measairspeedsim
|
||||
COMPILE_FLAGS
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS
|
||||
airspeedsim.cpp
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE platforms__posix__drivers__barosim
|
||||
MAIN barosim
|
||||
COMPILE_FLAGS
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS
|
||||
baro.cpp
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE platforms__posix__drivers__gpssim
|
||||
MAIN gpssim
|
||||
COMPILE_FLAGS
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS
|
||||
gpssim.cpp
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN gyrosim
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Wno-packed
|
||||
-Os
|
||||
SRCS
|
||||
gyrosim.cpp
|
||||
|
||||
@@ -43,8 +43,6 @@ px4_add_module(
|
||||
MODULE platforms__posix__px4_layer
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
SRCS
|
||||
px4_posix_impl.cpp
|
||||
px4_posix_tasks.cpp
|
||||
|
||||
@@ -55,7 +55,6 @@ px4_add_module(
|
||||
MODULE platforms__qurt__px4_layer
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
-Wno-packed
|
||||
SRCS
|
||||
${QURT_LAYER_SRCS}
|
||||
${CONFIG_SRC}
|
||||
|
||||
@@ -34,7 +34,6 @@ px4_add_module(
|
||||
MODULE systemcmds__mtd
|
||||
MAIN mtd
|
||||
COMPILE_FLAGS
|
||||
-Wno-error
|
||||
-Os
|
||||
SRCS
|
||||
mtd.c
|
||||
|
||||
@@ -70,10 +70,10 @@ px4_add_module(
|
||||
MODULE systemcmds__tests
|
||||
MAIN tests
|
||||
STACK_MAIN 9000
|
||||
STACK_MAX 9000
|
||||
COMPILE_FLAGS
|
||||
-Wframe-larger-than=8000
|
||||
-Wno-float-equal
|
||||
-O0
|
||||
-Os
|
||||
SRCS ${srcs}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
|
||||
Reference in New Issue
Block a user