more -Wcast-qual

This commit is contained in:
hathach 2021-10-17 17:32:03 +07:00
parent a5f516893b
commit 31cd366935
17 changed files with 20 additions and 57 deletions

View File

@ -18,6 +18,9 @@ CFLAGS += \
-DSVC_Handler=SVCall_Handler \
-DHWREV=$(HWREV)
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/same51j19a_flash.ld

View File

@ -14,7 +14,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC40XX
# mcu driver cause following warnings
CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter
CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc40xx/lpc_chip_40xx

View File

@ -13,7 +13,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC43XX
# mcu driver cause following warnings
CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes
CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx

View File

@ -122,7 +122,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
LPUART_WriteBlocking(UART_PORT, (uint8_t*)buf, len);
LPUART_WriteBlocking(UART_PORT, (uint8_t const*) buf, len);
return len;
}

View File

@ -153,7 +153,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
LPSCI_WriteBlocking(UART_PORT, (uint8_t*)buf, len);
LPSCI_WriteBlocking(UART_PORT, (uint8_t const*) buf, len);
return len;
}

View File

@ -12,7 +12,7 @@ CFLAGS += \
-DRTC_EV_SUPPORT=0
# lpc_types.h cause following errors
CFLAGS += -Wno-error=strict-prototypes
CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x

View File

@ -12,7 +12,7 @@ CFLAGS += \
-DRTC_EV_SUPPORT=0
# startup.c and lpc_types.h cause following errors
CFLAGS += -Wno-error=strict-prototypes
CFLAGS += -Wno-error=strict-prototypes -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x

View File

@ -13,7 +13,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_LPC43XX
# mcu driver cause following warnings
CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter
CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter -Wno-error=cast-qual
MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx

View File

@ -16,24 +16,12 @@ LD_FILE = hw/bsp/$(BOARD)/nuc121_flash.ld
SRC_C += \
src/portable/nuvoton/nuc121/dcd_nuc121.c \
hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/adc.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/bpwm.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/clk.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/fmc.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/i2c.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/pdma.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/pwm.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/spi_i2s.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/sys.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/timer.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/uart.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/usbd.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_i2c.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_spi.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/usci_uart.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/wdt.c \
hw/mcu/nuvoton/nuc121_125/StdDriver/src/wwdt.c
hw/mcu/nuvoton/nuc121_125/StdDriver/src/uart.c
SRC_S += \
hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/GCC/startup_NUC121.S

View File

@ -17,28 +17,13 @@ LD_FILE = hw/bsp/$(BOARD)/nuc126_flash.ld
SRC_C += \
src/portable/nuvoton/nuc121/dcd_nuc121.c \
hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/system_NUC126.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/acmp.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/adc.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/clk.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/crc.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/ebi.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/fmc.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/gpio.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/pdma.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/pwm.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/rtc.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/sc.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/scuart.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/spi.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/sys.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/timer.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/timer_pwm.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/uart.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/usbd.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/usci_spi.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/usci_uart.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/wdt.c \
hw/mcu/nuvoton/nuc126/StdDriver/src/wwdt.c
hw/mcu/nuvoton/nuc126/StdDriver/src/uart.c
SRC_S += \
hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/GCC/startup_NUC126.S

View File

@ -15,26 +15,11 @@ LD_FILE = hw/bsp/nutiny_sdk_nuc120/nuc120_flash.ld
SRC_C += \
src/portable/nuvoton/nuc120/dcd_nuc120.c \
hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/system_NUC100Series.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/acmp.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/adc.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/clk.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/crc.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/fmc.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/gpio.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/i2c.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/i2s.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/pdma.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/ps2.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/pwm.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/rtc.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/sc.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/spi.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/sys.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/timer.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/uart.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/usbd.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/wdt.c \
hw/mcu/nuvoton/nuc100_120/StdDriver/src/wwdt.c
hw/mcu/nuvoton/nuc100_120/StdDriver/src/uart.c
SRC_S += \
hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/GCC/startup_NUC100Series.S

View File

@ -15,6 +15,8 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAME5X \
-DBOARD_NAME="\"Microchip SAM E54 Xplained Pro\""
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual
# All source paths should be relative to the top level.
LD_FILE = hw/bsp/$(BOARD)/same54p20a_flash.ld

View File

@ -11,7 +11,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
# suppress following warnings from mcu driver
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
ASF_DIR = hw/mcu/microchip/same70

View File

@ -11,7 +11,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
# suppress following warnings from mcu driver
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
ASF_DIR = hw/mcu/microchip/same70

View File

@ -12,7 +12,7 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMG
# suppress following warnings from mcu driver
CFLAGS += -Wno-error=undef
CFLAGS += -Wno-error=undef -Wno-error=cast-qual
ASF_DIR = hw/mcu/microchip/samg55

View File

@ -257,7 +257,7 @@ int board_uart_read(uint8_t* buf, int len)
int board_uart_write(void const * buf, int len)
{
HAL_UART_Transmit(&UartHandle, (uint8_t*) buf, len, 0xffff);
HAL_UART_Transmit(&UartHandle, (uint8_t*)(uintptr_t) buf, len, 0xffff);
return len;
}

View File

@ -134,7 +134,7 @@ static int _dcd_setup(FAR struct usbdevclass_driver_s *driver, FAR struct usbdev
if (usbdcd_driver.setup_processed)
{
usbdcd_driver.setup_processed = false;
dcd_event_setup_received(0, (uint8_t *) ctrl, true);
dcd_event_setup_received(0, (uint8_t const *) ctrl, true);
}
else
{