add more warning option, also fix -Wconversion with rp2040

-Wuninitialized, -Wunused,  -Wredundant-decls
This commit is contained in:
hathach
2022-06-24 19:45:49 +07:00
parent 4639cac85c
commit 4f6e770eda
17 changed files with 58 additions and 42 deletions

View File

@@ -16,7 +16,7 @@ CFLAGS += \
CROSS_COMPILE = arm-none-eabi-
# mcu driver cause following warnings
CFLAGS += -Wno-error=cast-qual
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \

View File

@@ -15,7 +15,7 @@ CFLAGS += \
CROSS_COMPILE = aarch64-none-elf-
# mcu driver cause following warnings
CFLAGS += -Wno-error=cast-qual
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \

View File

@@ -23,7 +23,7 @@ CFLAGS += -DBOARD_TUH_RHPORT=$(BOARD_TUH_RHPORT)
endif
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=implicit-fallthrough=
CFLAGS += -Wno-error=unused-parameter -Wno-error=implicit-fallthrough -Wno-error=redundant-decls
MCU_DIR = $(SDK_DIR)/devices/$(MCU_VARIANT)

View File

@@ -52,7 +52,6 @@ void USB_DeviceClockInit (void)
//--------------------------------------------------------------------+
// LED
void board_led_write (bool state);
extern u32 SystemCoreClock;
const int baudrate = 115200;

View File

@@ -16,6 +16,9 @@ CFLAGS += \
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
# warning caused by dcd_nrf5x.c due to include of usbd.h and re-declare of dcd_int_handler()
CFLAGS += -Wno-error=redundant-decls
# All source paths should be relative to the top level.
LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld

View File

@@ -13,6 +13,9 @@ CFLAGS += \
-mlittle-endian-data \
-DSSIZE_MAX=__INT_MAX__
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=redundant-decls
SRC_C += \
src/portable/renesas/usba/dcd_usba.c \
src/portable/renesas/usba/hcd_usba.c \

View File

@@ -13,7 +13,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMD21
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \

View File

@@ -14,7 +14,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAML22
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \