Skip to content

Commit 38ad56c

Browse files
committed
fix more warnings from MSVC
1 parent f34c139 commit 38ad56c

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

source/FreeRTOS_DNS_Parser.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@
582582
( void ) memcpy( &( pxAnswer->ulIPAddress ), xEndPoint.ipv6_settings.xIPAddress.ucBytes, ipSIZE_OF_IPv6_ADDRESS );
583583
uxDistance = ( size_t ) ( xSet.pucByte - pucNewBuffer );
584584
/* An extra 12 bytes will be sent compared to an A-record. */
585-
usLength = ( int16_t ) sizeof( *pxAnswer ) + uxDistance + ipSIZE_OF_IPv6_ADDRESS - sizeof( pxAnswer->ulIPAddress );
585+
usLength = ( int16_t ) ( sizeof( *pxAnswer ) + uxDistance + ipSIZE_OF_IPv6_ADDRESS - sizeof( pxAnswer->ulIPAddress ) );
586586
}
587587
else
588588
{
@@ -1045,6 +1045,11 @@
10451045
NetworkEndPoint_t xEndPoint;
10461046
BaseType_t xMustReply = pdFALSE;
10471047

1048+
/* Not used for now */
1049+
( void ) uxBufferLength;
1050+
( void ) uxBytesNeeded;
1051+
( void ) xMustReply;
1052+
10481053
/* Read the request flags in host endianness. */
10491054
usFlags = usChar2u16( &( pucUDPPayloadBuffer[ offsetof( NBNSRequest_t, usFlags ) ] ) );
10501055

source/FreeRTOS_IP_Utils.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,11 +645,11 @@ static void prvChecksumProtocolSetChecksum( BaseType_t xOutgoingPacket,
645645
{
646646
/* This is an incoming packet and it doesn't need debug logging. */
647647
}
648-
#else /* if ( ipconfigHAS_DEBUG_PRINTF != 0 ) */
649-
/* Mention parameters that are not used by the function. */
650-
( void ) uxBufferLength;
651-
( void ) pucEthernetBuffer;
652648
#endif /* ipconfigHAS_DEBUG_PRINTF != 0 */
649+
650+
/* Mention parameters that are not used by the function. */
651+
( void ) uxBufferLength;
652+
( void ) pucEthernetBuffer;
653653
}
654654
/*-----------------------------------------------------------*/
655655

source/FreeRTOS_TCP_State_Handling_IPV6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
/* coverity[misra_c_2012_rule_11_3_violation] */
8585
const TCPPacket_IPv6_t * pxTCPPacket = ( ( const TCPPacket_IPv6_t * ) pxNetworkBuffer->pucEthernetBuffer );
8686
FreeRTOS_Socket_t * pxReturn = NULL;
87-
uint32_t ulInitialSequenceNumber;
87+
uint32_t ulInitialSequenceNumber = 0;
8888
BaseType_t xHasSequence = pdFALSE;
8989

9090
configASSERT( pxNetworkBuffer->pxEndPoint != NULL );

0 commit comments

Comments
 (0)