Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable build warnings #49

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 67 additions & 16 deletions nrf70_bm_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,74 @@ if (CONFIG_NRF70_BM_LIB)
source/common/nrf70_bm_core.c
)

if(CONFIG_NRF70_BM_RADIO_TEST)
target_sources(
nrf70-bm-lib
PRIVATE
source/radio_test/nrf70_bm_lib.c
source/radio_test/nrf70_bm_core.c
)
endif()
if(CONFIG_NRF70_BM_RADIO_TEST)
target_sources(
nrf70-bm-lib
PRIVATE
source/radio_test/nrf70_bm_lib.c
source/radio_test/nrf70_bm_core.c
)
endif()

if(CONFIG_NRF70_BM_SCAN_ONLY)
target_sources(
nrf70-bm-lib
PRIVATE
source/system/nrf70_bm_lib.c
source/system/nrf70_bm_core.c
)
endif()
if(CONFIG_NRF70_BM_SCAN_ONLY)
target_sources(
nrf70-bm-lib
PRIVATE
source/system/nrf70_bm_lib.c
source/system/nrf70_bm_core.c
)
endif()

target_link_libraries(nrf70-bm-lib PRIVATE nrf70-zep-shim nrf-wifi-osal)

target_compile_options(nrf70-bm-lib PRIVATE
-Wall # All warnings
-Wextra # Extra warnings
-Werror # Warnings as errors
-Wformat=2 # Format string checks
-Wformat-security # Security issues with format strings
-Wnull-dereference # Null pointer dereferences
-Wstack-protector # Stack protection
-fstack-protector-strong # Strong stack protection
-Warray-bounds # Array bounds checking
-Wstringop-overflow # String operation overflow
-Wconversion # Implicit conversions
-Wsign-conversion # Sign conversions
-Wmissing-include-dirs # Missing include directories
-Wcast-align # Pointer cast alignment
-Wcast-qual # Pointer cast dropping qualifiers
-Wdiscarded-qualifiers # Discarded qualifiers
-Wduplicated-branches # Duplicated branches
-Wduplicated-cond # Duplicated conditions
-Wlogical-op # Suspicious logical operators
-Wnull-dereference # Null pointer dereferences
-Wjump-misses-init # Goto skipping variable initialization
-Wunused-parameter # Unused parameters
-Wshift-overflow=2 # Shift overflows
-Wmissing-prototypes # Missing function prototypes
-Wredundant-decls # Redundant declarations
-Wtype-limits # Type limits
-Wshadow # Shadowed variables
-Wstrict-prototypes # Strict prototypes
-Wundef # Undefined macros
-Wuninitialized # Uninitialized variables
-Wpointer-arith # Pointer arithmetic
-Wbad-function-cast # Bad function casts
-Wstrict-overflow # Strict overflow
-Winline # Inlining issues
-Wnested-externs # Nested externs
-Wold-style-definition # Old-style definitions
-Wmissing-declarations # Missing declarations
-Wmissing-noreturn # Missing noreturn
-Wdisabled-optimization # Disabled optimizations
-Wfloat-equal # Floating point equality
-Winit-self # Initialization to self
-Wswitch-default # Missing switch default
-Wswitch-enum # Missing switch enum
-Wunsafe-loop-optimizations # Unsafe loop optimizations
-Wlogical-not-parentheses # Logical not parentheses
-Wstrict-aliasing # Strict aliasing
-Wvariadic-macros # Variadic macros
-Wvolatile-register-var # Volatile register variables
)
endif()
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ manifest:
# nRF70 Wi-Fi OSAL library
- name: nrf_wifi
repo-path: nrf_wifi
revision: a4e0a470fffdead2af5bcd63eac050b6614a7281
revision: pull/30/head
path: modules/lib/nrf_wifi
# nRF70 Wi-Fi firmware blobs (without west blobs fetch)
- name: nrfxlib
Expand Down