Skip to content

Commit ec6d304

Browse files
committed
[bsp/stm32]fix compile warning
1 parent fbe6563 commit ec6d304

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

bsp/stm32/libraries/HAL_Drivers/drivers/drv_adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ static int stm32_adc_init(void)
341341
int result = RT_EOK;
342342
/* save adc name */
343343
char name_buf[5] = {'a', 'd', 'c', '0', 0};
344-
int i = 0;
344+
rt_uint32_t i = 0;
345345

346346
for (i = 0; i < sizeof(adc_config) / sizeof(adc_config[0]); i++)
347347
{

bsp/stm32/libraries/HAL_Drivers/drivers/drv_flash/drv_flash_f4.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ const struct fal_flash_dev stm32_onchip_flash_16k =
388388
fal_flash_erase_16k,
389389
},
390390
8,
391+
{},
391392
};
392393
const struct fal_flash_dev stm32_onchip_flash_64k =
393394
{
@@ -402,6 +403,7 @@ const struct fal_flash_dev stm32_onchip_flash_64k =
402403
fal_flash_erase_64k,
403404
},
404405
8,
406+
{},
405407
};
406408
const struct fal_flash_dev stm32_onchip_flash_128k =
407409
{
@@ -416,6 +418,7 @@ const struct fal_flash_dev stm32_onchip_flash_128k =
416418
fal_flash_erase_128k,
417419
},
418420
8,
421+
{},
419422
};
420423

421424
static int fal_flash_read_16k(long offset, rt_uint8_t *buf, size_t size)

bsp/stm32/libraries/HAL_Drivers/drivers/drv_tim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
858858

859859
static int stm32_hwtimer_init(void)
860860
{
861-
int i = 0;
861+
rt_uint32_t i = 0;
862862
int result = RT_EOK;
863863

864864
for (i = 0; i < sizeof(stm32_hwtimer_obj) / sizeof(stm32_hwtimer_obj[0]); i++)

bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ int rt_hw_usart_init(void)
13151315
rt_size_t obj_num = sizeof(uart_obj) / sizeof(struct stm32_uart);
13161316

13171317
stm32_uart_get_config();
1318-
for (int i = 0; i < obj_num; i++)
1318+
for (rt_uint32_t i = 0; i < obj_num; i++)
13191319
{
13201320
/* init UART object */
13211321
uart_obj[i].config = &uart_config[i];

0 commit comments

Comments
 (0)