Skip to content

Commit

Permalink
EDS: fixups to compiler config to avoid false warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Oct 1, 2024
1 parent 2878379 commit cb37a04
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
22 changes: 13 additions & 9 deletions cmake/sample_defs/arch_build_custom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@
# and uses the same warning options that are applied at the mission level.
#
add_compile_options(
-std=c99 # Target the C99 standard (without gcc extensions)
-pedantic # Issue all the warnings demanded by strict ISO C
-Wall # Warn about most questionable operations
-Wstrict-prototypes # Warn about missing prototypes
-Wwrite-strings # Warn if not treating string literals as "const"
-Wpointer-arith # Warn about suspicious pointer operations
-Werror # Treat warnings as errors (code should be clean)
-Wno-format-truncation # Inhibit printf-style format truncation warnings
-Wno-stringop-truncation # Inhibit string operation truncation warnings
-std=c99 # Target the C99 standard (without gcc extensions)
-pedantic # Issue all the warnings demanded by strict ISO C
-fstrict-aliasing
-Wall # Warn about most questionable operations
-Wstrict-prototypes # Warn about missing prototypes
-Wstrict-aliasing # Warn about strict aliasing violations
-Wwrite-strings # Warn if not treating string literals as "const"
-Wpointer-arith # Warn about suspicious pointer operations
-Wcast-align # Warn about casts that increase alignment requirements
-Werror # Treat warnings as errors (code should be clean)
-Wno-conversion # Lots of false positives
-Wno-stringop-truncation # Lots of false positives
-Wno-format-truncation # Lots of false positives
)

2 changes: 2 additions & 0 deletions cmake/sample_defs/mission_build_custom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ add_compile_options(
-Wpointer-arith # Warn about suspicious pointer operations
-Wcast-align # Warn about casts that increase alignment requirements
-Werror # Treat warnings as errors (code should be clean)
-Wno-format-truncation # Many false positives/non-issues
-Wno-stringop-truncation # Many false positives/non-issues
)

# The _XOPEN_SOURCE directive is required for glibc to enable conformance with the
Expand Down
16 changes: 16 additions & 0 deletions cmake/sample_defs/native_osconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,19 @@ set(OSAL_CONFIG_DEBUG_PERMISSIVE_MODE TRUE)
# However for a flight deployment this may cause undesired delays.
#
set(OSAL_CONFIG_UTILITYTASK_PRIORITY 10)

#
# OSAL_CONFIG_INCLUDE_SHELL
# --------------------------------
#
# Enable the shell functions in OSAL
set(OSAL_CONFIG_INCLUDE_SHELL TRUE)

#
# OSAL_CONFIG_PRINTF_BUFFER_SIZE
# --------------------------------
#
# Increase the OS_printf buffer size
set(OSAL_CONFIG_PRINTF_BUFFER_SIZE 300)


0 comments on commit cb37a04

Please sign in to comment.