mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 15:07:34 +08:00
re-enable Werror
This commit is contained in:
@@ -482,13 +482,13 @@ function(px4_add_common_flags)
|
||||
|
||||
set(warnings
|
||||
-Wall
|
||||
-Werror
|
||||
-Wno-sign-compare
|
||||
-Wextra
|
||||
#-Wshadow # very verbose due to eigen
|
||||
-Wfloat-equal
|
||||
-Wpointer-arith
|
||||
-Wmissing-declarations
|
||||
-Wpacked
|
||||
-Wno-unused-parameter
|
||||
-Werror=format-security
|
||||
-Werror=array-bounds
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#ifndef I2C_FRAME_H_
|
||||
#define I2C_FRAME_H_
|
||||
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef struct i2c_frame
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN fmu
|
||||
STACK 1200
|
||||
COMPILE_FLAGS
|
||||
-Weffc++
|
||||
-Os
|
||||
SRCS
|
||||
fmu.cpp
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN px4io
|
||||
STACK 1200
|
||||
COMPILE_FLAGS
|
||||
-Weffc++
|
||||
-Os
|
||||
SRCS
|
||||
px4io.cpp
|
||||
|
||||
@@ -35,7 +35,7 @@ px4_add_module(
|
||||
MAIN attitude_estimator_ekf
|
||||
STACK 1200
|
||||
COMPILE_FLAGS
|
||||
-Wframe-larger-than=2400
|
||||
-Wframe-larger-than=3000
|
||||
-Wno-float-equal
|
||||
|
||||
SRCS
|
||||
|
||||
@@ -34,7 +34,7 @@ set(MODULE_CFLAGS -Os)
|
||||
|
||||
if(NOT ${OS} STREQUAL "qurt")
|
||||
list(APPEND MODULE_CFLAGS
|
||||
-Wframe-larger-than=2200)
|
||||
-Wframe-larger-than=2600)
|
||||
endif()
|
||||
px4_add_module(
|
||||
MODULE modules__commander
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
set(MODULE_CFLAGS -Weffc++)
|
||||
set(MODULE_CFLAGS )
|
||||
if(NOT ${OS} STREQUAL "qurt")
|
||||
list(APPEND MODULE_CFLAGS -Wframe-larger-than=3400)
|
||||
endif()
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN land_detector
|
||||
STACK 1200
|
||||
COMPILE_FLAGS
|
||||
-Weffc++
|
||||
-Os
|
||||
|
||||
SRCS
|
||||
|
||||
@@ -35,11 +35,11 @@ px4_add_module(
|
||||
MAIN mavlink
|
||||
STACK 1200
|
||||
COMPILE_FLAGS
|
||||
-Weffc++
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-DMAVLINK_COMM_NUM_BUFFERS=3
|
||||
-Wno-packed
|
||||
-Wframe-larger-than=2000
|
||||
-Os
|
||||
SRCS
|
||||
mavlink.c
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
px4_add_module(
|
||||
MODULE modules__mc_att_control_multiplatform
|
||||
MAIN mc_att_control_m
|
||||
COMPILE_FLAGS
|
||||
-Wframe-larger-than=1300
|
||||
SRCS
|
||||
mc_att_control_main.cpp
|
||||
mc_att_control_start_nuttx.cpp
|
||||
|
||||
@@ -34,7 +34,7 @@ px4_add_module(
|
||||
MODULE modules__mc_pos_control_multiplatform
|
||||
MAIN mc_pos_control_m
|
||||
COMPILE_FLAGS
|
||||
-Wframe-larger-than=1200
|
||||
-Wframe-larger-than=1900
|
||||
|
||||
SRCS
|
||||
mc_pos_control_main.cpp
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
############################################################################
|
||||
set(MODULE_CFLAGS)
|
||||
if(NOT ${OS} STREQUAL "qurt")
|
||||
list(APPEND MODULE_CFLAGS -Wframe-larger-than=3800)
|
||||
list(APPEND MODULE_CFLAGS -Wframe-larger-than=3900)
|
||||
endif()
|
||||
px4_add_module(
|
||||
MODULE modules__position_estimator_inav
|
||||
|
||||
@@ -40,10 +40,10 @@ px4_add_module(
|
||||
MODULE modules__simulator
|
||||
MAIN simulator
|
||||
COMPILE_FLAGS
|
||||
-Weffc++
|
||||
-Wno-attributes
|
||||
-Wno-packed
|
||||
-Wno-packed
|
||||
-Wframe-larger-than=1500
|
||||
|
||||
SRCS
|
||||
${SIMULATOR_SRCS}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
set(uavcan_c_flags ${c_flags})
|
||||
list(REMOVE_ITEM uavcan_c_flags -std=gnu++0x -D__CUSTOM_FILE_IO__)
|
||||
set(uavcan_cxx_flags ${cxx_flags})
|
||||
list(REMOVE_ITEM uavcan_cxx_flags -std=gnu++0x -std=c++11 -D__CUSTOM_FILE_IO__)
|
||||
list(REMOVE_ITEM uavcan_cxx_flags -std=gnu++0x -std=c++11 -Wundef -Werror -D__CUSTOM_FILE_IO__)
|
||||
set(uavcan_deps git_uavcan)
|
||||
set(uavcan_platform generic)
|
||||
|
||||
@@ -94,6 +94,8 @@ px4_add_module(
|
||||
MAIN uavcan
|
||||
STACK 3200
|
||||
COMPILE_FLAGS
|
||||
-Wframe-larger-than=1500
|
||||
-Wno-deprecated-declarations
|
||||
-O3
|
||||
SRCS
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN gyrosim
|
||||
STACK 1200
|
||||
COMPILE_FLAGS
|
||||
-Weffc++
|
||||
-Os
|
||||
SRCS
|
||||
gyrosim.cpp
|
||||
|
||||
@@ -34,7 +34,7 @@ set(MIXER_CFLAGS -Os)
|
||||
if(${OS} STREQUAL "qurt")
|
||||
list(APPEND MIXER_CFLAGS -Wframe-larger-than=2176)
|
||||
else()
|
||||
list(APPEND MIXER_CFLAGS -Wframe-larger-than=2048)
|
||||
list(APPEND MIXER_CFLAGS -Wframe-larger-than=2064)
|
||||
endif()
|
||||
|
||||
px4_add_module(
|
||||
|
||||
Reference in New Issue
Block a user