(GCC) Warning: 'typedef' was ignored in this declaration

本文探讨了在编程中遇到的警告问题:typedef被忽略在声明中,并提供了有效的解决方案,帮助开发者理解并避免这类错误。
09:02:49 **** Incremental Build of configuration Debug for project ov2640_AI **** make -j20 all arm-none-eabi-gcc "../Core/Src/ov2640_gpio.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xB -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/ov2640_gpio.d" -MT"Core/Src/ov2640_gpio.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/ov2640_gpio.o" ../Core/Src/ov2640_gpio.c: In function 'OV2640_GPIO_Init': ../Core/Src/ov2640_gpio.c:125:7: warning: implicit declaration of function 'OV2640_LoadConfig' [-Wimplicit-function-declaration] 125 | if (OV2640_LoadConfig(hov, ov2640_init_regs) != HAL_OK) return HAL_ERROR; | ^~~~~~~~~~~~~~~~~ ../Core/Src/ov2640_gpio.c: At top level: ../Core/Src/ov2640_gpio.c:140:26: error: conflicting types for 'OV2640_LoadConfig'; have 'HAL_StatusTypeDef(OV2640_GPIO_HandleTypeDef *, const uint8_t (*)[2])' {aka 'HAL_StatusTypeDef(OV2640_GPIO_HandleTypeDef *, const unsigned char (*)[2])'} 140 | static HAL_StatusTypeDef OV2640_LoadConfig(OV2640_GPIO_HandleTypeDef *hov, const uint8_t (*regs)[2]) { | ^~~~~~~~~~~~~~~~~ ../Core/Src/ov2640_gpio.c:125:7: note: previous implicit declaration of 'OV2640_LoadConfig' with type 'int()' 125 | if (OV2640_LoadConfig(hov, ov2640_init_regs) != HAL_OK) return HAL_ERROR; | ^~~~~~~~~~~~~~~~~ make: *** [Core/Src/subdir.mk:40: Core/Src/ov2640_gpio.o] Error 1 "make -j20 all" terminated with exit code 2. Build might be incomplete. 09:02:49 Build Failed. 2 errors, 1 warnings. (took 216ms)
07-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值