Skip to content

Commit 1bf801a

Browse files
committed
STM32G4 : remove warning
[Warning] serial_device.c@644,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare] [Warning] serial_device.c@644,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare] [Warning] serial_device.c@653,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare] [Warning] serial_device.c@653,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare] [Warning] serial_device.c@662,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare] [Warning] serial_device.c@662,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare] [Warning] serial_device.c@663,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare] [Warning] serial_device.c@663,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare] [Warning] stm32g4xx_hal_hrtim.c@1817,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32g4xx_hal_hrtim.c@1821,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32g4xx_hal_hrtim.c@2461,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32g4xx_hal_hrtim.c@2465,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32g4xx_hal_hrtim.c@6600,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32g4xx_hal_hrtim.c@7162,21: equality comparison with extraneous parentheses [-Wparentheses-equality] [Warning] stm32g4xx_hal_hrtim.c@7166,21: equality comparison with extraneous parentheses [-Wparentheses-equality]
1 parent 999d98a commit 1bf801a

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/STM32G4xx_HAL_Driver/stm32g4xx_hal_hrtim.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,13 +1814,13 @@ HAL_StatusTypeDef HAL_HRTIM_SimpleOCStart_DMA(HRTIM_HandleTypeDef * hhrtim,
18141814
/* Check the parameters */
18151815
assert_param(IS_HRTIM_TIMER_OUTPUT(TimerIdx, OCChannel));
18161816

1817-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
1817+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
18181818
{
18191819
return HAL_BUSY;
18201820
}
1821-
if((hhrtim->State == HAL_HRTIM_STATE_READY))
1821+
if (hhrtim->State == HAL_HRTIM_STATE_READY)
18221822
{
1823-
if((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
1823+
if ((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
18241824
{
18251825
return HAL_ERROR;
18261826
}
@@ -2458,13 +2458,13 @@ HAL_StatusTypeDef HAL_HRTIM_SimplePWMStart_DMA(HRTIM_HandleTypeDef * hhrtim,
24582458
/* Check the parameters */
24592459
assert_param(IS_HRTIM_TIMER_OUTPUT(TimerIdx, PWMChannel));
24602460

2461-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
2461+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
24622462
{
24632463
return HAL_BUSY;
24642464
}
2465-
if((hhrtim->State == HAL_HRTIM_STATE_READY))
2465+
if (hhrtim->State == HAL_HRTIM_STATE_READY)
24662466
{
2467-
if((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
2467+
if ((SrcAddr == 0U ) || (DestAddr == 0U ) || (Length == 0U))
24682468
{
24692469
return HAL_ERROR;
24702470
}
@@ -6597,7 +6597,7 @@ HAL_StatusTypeDef HAL_HRTIM_WaveformCountStart_DMA(HRTIM_HandleTypeDef * hhrtim,
65976597
/* Check the parameters */
65986598
assert_param(IS_HRTIM_TIMERID(Timers));
65996599

6600-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
6600+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
66016601
{
66026602
return HAL_BUSY;
66036603
}
@@ -7159,13 +7159,13 @@ HAL_StatusTypeDef HAL_HRTIM_BurstDMATransfer(HRTIM_HandleTypeDef *hhrtim,
71597159
/* Check the parameters */
71607160
assert_param(IS_HRTIM_TIMERINDEX(TimerIdx));
71617161

7162-
if((hhrtim->State == HAL_HRTIM_STATE_BUSY))
7162+
if (hhrtim->State == HAL_HRTIM_STATE_BUSY)
71637163
{
71647164
return HAL_BUSY;
71657165
}
7166-
if((hhrtim->State == HAL_HRTIM_STATE_READY))
7166+
if (hhrtim->State == HAL_HRTIM_STATE_READY)
71677167
{
7168-
if((BurstBufferAddress == 0U ) || (BurstBufferLength == 0U))
7168+
if ((BurstBufferAddress == 0U ) || (BurstBufferLength == 0U))
71697169
{
71707170
return HAL_ERROR;
71717171
}

targets/TARGET_STM/TARGET_STM32G4/serial_device.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
641641
}
642642
if (type == FlowControlRTS) {
643643
// Enable RTS
644-
MBED_ASSERT(pinmap->rx_flow_pin != (UARTName)NC);
644+
MBED_ASSERT(pinmap->rx_flow_pin != NC);
645645
obj_s->hw_flow_ctl = UART_HWCONTROL_RTS;
646646
obj_s->pin_rts = pinmap->rx_flow_pin;
647647
// Enable the pin for RTS function
@@ -650,7 +650,7 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
650650
}
651651
if (type == FlowControlCTS) {
652652
// Enable CTS
653-
MBED_ASSERT(pinmap->tx_flow_pin != (UARTName)NC);
653+
MBED_ASSERT(pinmap->tx_flow_pin != NC);
654654
obj_s->hw_flow_ctl = UART_HWCONTROL_CTS;
655655
obj_s->pin_cts = pinmap->tx_flow_pin;
656656
// Enable the pin for CTS function
@@ -659,8 +659,8 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
659659
}
660660
if (type == FlowControlRTSCTS) {
661661
// Enable CTS & RTS
662-
MBED_ASSERT(pinmap->rx_flow_pin != (UARTName)NC);
663-
MBED_ASSERT(pinmap->tx_flow_pin != (UARTName)NC);
662+
MBED_ASSERT(pinmap->rx_flow_pin != NC);
663+
MBED_ASSERT(pinmap->tx_flow_pin != NC);
664664
obj_s->hw_flow_ctl = UART_HWCONTROL_RTS_CTS;
665665
obj_s->pin_rts = pinmap->rx_flow_pin;;
666666
obj_s->pin_cts = pinmap->tx_flow_pin;;

0 commit comments

Comments
 (0)