Skip to content

Commit 88ad478

Browse files
author
John P. Lucas
authored
Merge pull request #304 from #303-turn-errors-up
[#303] - Fix compiler warnings and errors.
2 parents 071f6e6 + fc2674c commit 88ad478

File tree

14 files changed

+21
-17
lines changed

14 files changed

+21
-17
lines changed

cfg/nos3_defs/arch_build_custom.cmake

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,22 @@
2828
add_compile_options(
2929
#-std=c99 # Target the C99 standard (without gcc extensions)
3030
#-pedantic # Issue all the warnings demanded by strict ISO C
31-
-Wall # Warn about most questionable operations
31+
#-Wall # Warn about most questionable operations
3232
#-Wstrict-prototypes # Warn about missing prototypes
33-
-Wwrite-strings # Warn if not treating string literals as "const"
34-
-Wpointer-arith # Warn about suspicious pointer operations
33+
#-Wwrite-strings # Warn if not treating string literals as "const"
34+
#-Wpointer-arith # Warn about suspicious pointer operations
3535
#-Werror # Treat warnings as errors (code should be clean)
36-
-Wno-address-of-packed-member
36+
#-Wno-address-of-packed-member
3737
# Build Specific
3838
-DBYTE_ORDER_LE
3939
-D_LINUX_OS_
4040
-D_DEFAULT_SOURCE
4141
)
4242

43+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wstrict-prototypes -pedantic -Werror")
44+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wwrite-strings -Wpointer-arith -Wno-address-of-packed-member")
45+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
46+
4347
if (CFE_SYSTEM_PSPNAME STREQUAL "nos-linux")
4448
# find itc cmake module path
4549
find_path(_ITC_CMAKE_MODULES_

components/arducam

components/generic_adcs

components/generic_css

components/generic_mag

components/generic_torquer

0 commit comments

Comments
 (0)