summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-03-03 16:13:12 +0700
committerhathach <[email protected]>2023-03-03 16:13:12 +0700
commit70895358481255d5349461f99dc1f536aafec6ce (patch)
treea2cef5d7d9a995a4dab520b003ac2edb073f864c
parent9a8a9359e40c93c187743a469f3d984dbf2f6413 (diff)
clean up f0 warnings
-rw-r--r--hw/bsp/stm32f0/family.c2
-rw-r--r--hw/bsp/stm32f0/family.mk2
-rw-r--r--hw/bsp/stm32f0/stm32f0xx_hal_conf.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/hw/bsp/stm32f0/family.c b/hw/bsp/stm32f0/family.c
index a7e914128..0765f361d 100644
--- a/hw/bsp/stm32f0/family.c
+++ b/hw/bsp/stm32f0/family.c
@@ -165,7 +165,7 @@ void HardFault_Handler (void)
* @param line: assert_param error line source number
* @retval None
*/
-void assert_failed(uint8_t* file, uint32_t line)
+void assert_failed(const char* file, uint32_t line)
{
(void) file; (void) line;
/* USER CODE BEGIN 6 */
diff --git a/hw/bsp/stm32f0/family.mk b/hw/bsp/stm32f0/family.mk
index 2983af49e..a065e9221 100644
--- a/hw/bsp/stm32f0/family.mk
+++ b/hw/bsp/stm32f0/family.mk
@@ -24,7 +24,7 @@ GCC_CFLAGS += \
-nostdlib -nostartfiles \
# suppress warning caused by vendor mcu driver
-GCC_CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual
+GCC_CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
# IAR Flags
IAR_CFLAGS += --cpu cortex-m0
diff --git a/hw/bsp/stm32f0/stm32f0xx_hal_conf.h b/hw/bsp/stm32f0/stm32f0xx_hal_conf.h
index cfa66b366..0bf053e13 100644
--- a/hw/bsp/stm32f0/stm32f0xx_hal_conf.h
+++ b/hw/bsp/stm32f0/stm32f0xx_hal_conf.h
@@ -303,9 +303,9 @@
* If expr is true, it returns no value.
* @retval None
*/
- #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
+ #define assert_param(expr) ((expr) ? (void)0U : assert_failed(__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
- void assert_failed(uint8_t* file, uint32_t line);
+ void assert_failed(const char* file, uint32_t line);
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */