Skip to content

Commit 162200a

Browse files
Make conversions from uint8 to eIPTCPState_t explicit (#445)
Prevents this warning from the TI CCS compiler: warning #190-D: enumerated type mixed with another type Regardless of this compiler warning it seems like a good idea to signal that this conversion is OK and expected. This is already being done when doing the opposite conversion.
1 parent 1815741 commit 162200a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

FreeRTOS_Sockets.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,7 +2921,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket )
29212921
static BaseType_t bMayConnect( FreeRTOS_Socket_t const * pxSocket )
29222922
{
29232923
BaseType_t xResult;
2924-
eIPTCPState_t eState = pxSocket->u.xTCP.ucTCPState;
2924+
eIPTCPState_t eState = ( eIPTCPState_t ) pxSocket->u.xTCP.ucTCPState;
29252925

29262926
switch( eState )
29272927
{
@@ -3318,7 +3318,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket )
33183318

33193319
while( xByteCount == 0 )
33203320
{
3321-
eIPTCPState_t eState = pxSocket->u.xTCP.ucTCPState;
3321+
eIPTCPState_t eState = ( eIPTCPState_t ) pxSocket->u.xTCP.ucTCPState;
33223322

33233323
switch( eState )
33243324
{

FreeRTOS_TCP_IP.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@
397397
static BaseType_t prvTCPSocketIsActive( uint8_t ucStatus )
398398
{
399399
BaseType_t xResult;
400-
eIPTCPState_t eStatus = ucStatus;
400+
eIPTCPState_t eStatus = ( eIPTCPState_t ) ucStatus;
401401

402402
switch( eStatus )
403403
{
@@ -458,7 +458,7 @@
458458
static BaseType_t prvTCPStatusAgeCheck( FreeRTOS_Socket_t * pxSocket )
459459
{
460460
BaseType_t xResult;
461-
eIPTCPState_t eState = pxSocket->u.xTCP.ucTCPState;
461+
eIPTCPState_t eState = ( eIPTCPState_t ) pxSocket->u.xTCP.ucTCPState;
462462

463463
switch( eState )
464464
{
@@ -3357,7 +3357,7 @@
33573357
}
33583358
}
33593359

3360-
eState = pxSocket->u.xTCP.ucTCPState;
3360+
eState = ( eIPTCPState_t ) pxSocket->u.xTCP.ucTCPState;
33613361

33623362
switch( eState )
33633363
{

0 commit comments

Comments
 (0)