Skip to content

Commit 3c8cbd9

Browse files
committed
Enable all compiler warnings
1 parent d387819 commit 3c8cbd9

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

gecko_sdk_extensions/nc_efr32_watchdog_extension/inc/nc_efr32_wdog.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
#include "em_cmu.h"
2020
#include "em_wdog.h"
2121
#include "em_rmu.h"
22-
#include "sli_cpc_timer.h"
2322
#include "sl_component_catalog.h"
2423

2524
void nc_enable_watchdog(void);
26-
void nc_periodic_timer(sli_cpc_timer_handle_t *handle, void *data);
25+
void nc_poke_watchdog(void);

gecko_sdk_extensions/nc_efr32_watchdog_extension/src/nc_efr32_wdog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void nc_enable_watchdog(void)
8383
}
8484

8585

86-
void nc_poke_watchdog()
86+
void nc_poke_watchdog(void)
8787
{
8888
CORE_DECLARE_IRQ_STATE;
8989
CORE_ENTER_ATOMIC();

src/ot-rcp/app.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <openthread/ncp.h>
2222
#include <openthread/diag.h>
2323
#include <openthread/tasklet.h>
24+
#include <openthread/logging.h>
2425

2526
#include "openthread-system.h"
2627
#include "app.h"

tools/build_project.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,18 @@ def main():
549549
LOGGER.error("Defines were unused, aborting: %s", unused_defines)
550550
sys.exit(1)
551551

552+
# Fix Gecko SDK bugs
553+
sl_rail_util_pti_config_h = args.build_dir / "config/sl_rail_util_pti_config.h"
554+
555+
# PTI seemingly cannot be excluded, even if it is disabled
556+
if sl_rail_util_pti_config_h.exists():
557+
sl_rail_util_pti_config_h.write_text(
558+
sl_rail_util_pti_config_h.read_text().replace(
559+
'#warning "RAIL PTI peripheral not configured"\n',
560+
'// #warning "RAIL PTI peripheral not configured"\n',
561+
)
562+
)
563+
552564
# Remove absolute paths from the build for reproducibility
553565
extra_compiler_flags = [
554566
f"-ffile-prefix-map={str(src.absolute())}={dst}"
@@ -557,7 +569,7 @@ def main():
557569
args.build_dir: "/src",
558570
toolchain: "/toolchain",
559571
}.items()
560-
]
572+
] + ["-Wall", "-Wextra", "-Werror"]
561573

562574
output_artifact = (args.build_dir / "build/debug" / base_project_name).with_suffix(
563575
".gbl"

0 commit comments

Comments
 (0)