forked from Archive/PX4-Autopilot
Merge pull request #2845 from mcharleb/cmake-posix-resurection
Remove policy that broke posix and fix gcc warning
This commit is contained in:
commit
d7e69baf80
|
@ -498,7 +498,6 @@ function(px4_add_common_flags)
|
|||
-Werror=reorder
|
||||
-Werror=uninitialized
|
||||
-Werror=init-self
|
||||
-Wno-unused-const-variable
|
||||
#-Wcast-qual - generates spurious noreturn attribute warnings,
|
||||
# try again later
|
||||
#-Wconversion - would be nice, but too many "risky-but-safe"
|
||||
|
@ -507,7 +506,11 @@ function(px4_add_common_flags)
|
|||
# but generates too many false positives
|
||||
)
|
||||
|
||||
if (NOT ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
|
||||
list(APPEND warnings
|
||||
-Wno-unused-const-variable
|
||||
)
|
||||
else(${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
|
||||
list(APPEND warnings
|
||||
-Werror=unused-but-set-variable
|
||||
-Wformat=1
|
||||
|
|
Loading…
Reference in New Issue