Skip to content

Commit 7d05f22

Browse files
committed
STM32F7 warning compilation
[-Wparentheses-equality] [-Wsign-compare]
1 parent 09a58b5 commit 7d05f22

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_hcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ HAL_StatusTypeDef HAL_HCD_HC_SubmitRequest(HCD_HandleTypeDef *hhcd,
340340
uint8_t do_ping)
341341
{
342342
// MBED: added
343-
if ((hhcd->hc[ch_num].ep_is_in != direction)) {
344-
if ((hhcd->hc[ch_num].ep_type == EP_TYPE_CTRL)){
343+
if (hhcd->hc[ch_num].ep_is_in != direction) {
344+
if (hhcd->hc[ch_num].ep_type == EP_TYPE_CTRL){
345345
/* reconfigure the endpoint !!! from tx -> rx, and rx ->tx */
346346
USB_OTG_GlobalTypeDef *USBx = hhcd->Instance;
347347
if (direction)

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)
334334
USB_OTG_GlobalTypeDef *USBx = hpcd->Instance;
335335
uint32_t i = 0, ep_intr = 0, epint = 0, epnum = 0;
336336
uint32_t fifoemptymsk = 0, temp = 0;
337-
USB_OTG_EPTypeDef *ep = NULL;
337+
// USB_OTG_EPTypeDef *ep = NULL;
338338
uint32_t hclk = 200000000;
339339

340340
/* ensure that we are in device mode */

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,11 @@ HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pDat
471471
/* Check the parameters */
472472
assert_param(IS_TIM_DMA_INSTANCE(htim->Instance));
473473

474-
if((htim->State == HAL_TIM_STATE_BUSY))
474+
if(htim->State == HAL_TIM_STATE_BUSY)
475475
{
476476
return HAL_BUSY;
477477
}
478-
else if((htim->State == HAL_TIM_STATE_READY))
478+
else if(htim->State == HAL_TIM_STATE_READY)
479479
{
480480
if((pData == 0 ) && (Length > 0))
481481
{
@@ -895,11 +895,11 @@ HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel
895895
/* Check the parameters */
896896
assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel));
897897

898-
if((htim->State == HAL_TIM_STATE_BUSY))
898+
if(htim->State == HAL_TIM_STATE_BUSY)
899899
{
900900
return HAL_BUSY;
901901
}
902-
else if((htim->State == HAL_TIM_STATE_READY))
902+
else if(htim->State == HAL_TIM_STATE_READY)
903903
{
904904
if(((uint32_t)pData == 0 ) && (Length > 0))
905905
{
@@ -1435,11 +1435,11 @@ HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channe
14351435
/* Check the parameters */
14361436
assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel));
14371437

1438-
if((htim->State == HAL_TIM_STATE_BUSY))
1438+
if(htim->State == HAL_TIM_STATE_BUSY)
14391439
{
14401440
return HAL_BUSY;
14411441
}
1442-
else if((htim->State == HAL_TIM_STATE_READY))
1442+
else if(htim->State == HAL_TIM_STATE_READY)
14431443
{
14441444
if(((uint32_t)pData == 0 ) && (Length > 0))
14451445
{
@@ -1949,11 +1949,11 @@ HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel
19491949
assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel));
19501950
assert_param(IS_TIM_DMA_CC_INSTANCE(htim->Instance));
19511951

1952-
if((htim->State == HAL_TIM_STATE_BUSY))
1952+
if(htim->State == HAL_TIM_STATE_BUSY)
19531953
{
19541954
return HAL_BUSY;
19551955
}
1956-
else if((htim->State == HAL_TIM_STATE_READY))
1956+
else if(htim->State == HAL_TIM_STATE_READY)
19571957
{
19581958
if((pData == 0 ) && (Length > 0))
19591959
{
@@ -2834,11 +2834,11 @@ HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Ch
28342834
/* Check the parameters */
28352835
assert_param(IS_TIM_DMA_CC_INSTANCE(htim->Instance));
28362836

2837-
if((htim->State == HAL_TIM_STATE_BUSY))
2837+
if(htim->State == HAL_TIM_STATE_BUSY)
28382838
{
28392839
return HAL_BUSY;
28402840
}
2841-
else if((htim->State == HAL_TIM_STATE_READY))
2841+
else if(htim->State == HAL_TIM_STATE_READY)
28422842
{
28432843
if((((pData1 == 0) || (pData2 == 0) )) && (Length > 0))
28442844
{
@@ -3656,11 +3656,11 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t
36563656
assert_param(IS_TIM_DMA_SOURCE(BurstRequestSrc));
36573657
assert_param(IS_TIM_DMA_LENGTH(BurstLength));
36583658

3659-
if((htim->State == HAL_TIM_STATE_BUSY))
3659+
if(htim->State == HAL_TIM_STATE_BUSY)
36603660
{
36613661
return HAL_BUSY;
36623662
}
3663-
else if((htim->State == HAL_TIM_STATE_READY))
3663+
else if(htim->State == HAL_TIM_STATE_READY)
36643664
{
36653665
if((BurstBuffer == 0 ) && (BurstLength > 0))
36663666
{
@@ -3881,11 +3881,11 @@ HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t B
38813881
assert_param(IS_TIM_DMA_SOURCE(BurstRequestSrc));
38823882
assert_param(IS_TIM_DMA_LENGTH(BurstLength));
38833883

3884-
if((htim->State == HAL_TIM_STATE_BUSY))
3884+
if(htim->State == HAL_TIM_STATE_BUSY)
38853885
{
38863886
return HAL_BUSY;
38873887
}
3888-
else if((htim->State == HAL_TIM_STATE_READY))
3888+
else if(htim->State == HAL_TIM_STATE_READY)
38893889
{
38903890
if((BurstBuffer == 0 ) && (BurstLength > 0))
38913891
{

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_tim_ex.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,11 @@ HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef *htim, uint32
423423
/* Check the parameters */
424424
assert_param(IS_TIM_XOR_INSTANCE(htim->Instance));
425425

426-
if((htim->State == HAL_TIM_STATE_BUSY))
426+
if(htim->State == HAL_TIM_STATE_BUSY)
427427
{
428428
return HAL_BUSY;
429429
}
430-
else if((htim->State == HAL_TIM_STATE_READY))
430+
else if(htim->State == HAL_TIM_STATE_READY)
431431
{
432432
if(((uint32_t)pData == 0 ) && (Length > 0))
433433
{
@@ -729,11 +729,11 @@ HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Chan
729729
/* Check the parameters */
730730
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
731731

732-
if((htim->State == HAL_TIM_STATE_BUSY))
732+
if(htim->State == HAL_TIM_STATE_BUSY)
733733
{
734734
return HAL_BUSY;
735735
}
736-
else if((htim->State == HAL_TIM_STATE_READY))
736+
else if(htim->State == HAL_TIM_STATE_READY)
737737
{
738738
if(((uint32_t)pData == 0 ) && (Length > 0))
739739
{
@@ -1145,11 +1145,11 @@ HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Cha
11451145
/* Check the parameters */
11461146
assert_param(IS_TIM_CCXN_INSTANCE(htim->Instance, Channel));
11471147

1148-
if((htim->State == HAL_TIM_STATE_BUSY))
1148+
if(htim->State == HAL_TIM_STATE_BUSY)
11491149
{
11501150
return HAL_BUSY;
11511151
}
1152-
else if((htim->State == HAL_TIM_STATE_READY))
1152+
else if(htim->State == HAL_TIM_STATE_READY)
11531153
{
11541154
if(((uint32_t)pData == 0 ) && (Length > 0))
11551155
{

targets/TARGET_STM/TARGET_STM32F7/flash_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static uint32_t GetSectorSize(uint32_t Sector)
281281
*/
282282
static uint32_t GetSectorBase(uint32_t SectorId)
283283
{
284-
int i = 0;
284+
uint32_t i = 0;
285285
uint32_t address_sector = FLASH_BASE;
286286

287287
for (i = 0; i < SectorId; i++) {

0 commit comments

Comments
 (0)