Skip to content

Commit c244dc7

Browse files
Fix misc warnings. (#230)
* Fix two warnings in TCP source
1 parent d6d2ddb commit c244dc7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

FreeRTOS_IP.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,13 +1997,11 @@ static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPP
19971997
if( pxIPPacket->xIPHeader.ucProtocol == ( uint8_t ) ipPROTOCOL_UDP )
19981998
{
19991999
ProtocolPacket_t * pxProtPack;
2000-
const uint16_t * pusChecksum;
20012000

20022001
/* pxProtPack will point to the offset were the protocols begin. */
20032002
pxProtPack = ipCAST_PTR_TO_TYPE_PTR( ProtocolPacket_t, &( pxNetworkBuffer->pucEthernetBuffer[ uxHeaderLength - ipSIZE_OF_IPv4_HEADER ] ) );
2004-
pusChecksum = ( const uint16_t * ) ( &( pxProtPack->xUDPPacket.xUDPHeader.usChecksum ) );
20052003

2006-
if( *pusChecksum == ( uint16_t ) 0U )
2004+
if( pxProtPack->xUDPPacket.xUDPHeader.usChecksum == ( uint16_t ) 0U )
20072005
{
20082006
#if ( ipconfigHAS_PRINTF != 0 )
20092007
{

tools/tcp_utilities/tcp_mem_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
#ifndef ipconfigTCP_MEM_STATS_MAX_ALLOCATION
5151
#define ipconfigTCP_MEM_STATS_MAX_ALLOCATION 128u
52-
#pragma warning "ipconfigTCP_MEM_STATS_MAX_ALLOCATION undefined?"
52+
#pragma message ("ipconfigTCP_MEM_STATS_MAX_ALLOCATION undefined?")
5353
#endif
5454

5555
#if ( ipconfigUSE_TCP_MEM_STATS != 0 )

0 commit comments

Comments
 (0)