cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
srojas
Observer
Observer
343 Views
Registered: ‎05-20-2019

LwIP warning in tcp.c "comparison is always true" in 2020.1

Jump to solution

Hi,

I recentrly switched from using the lwip202_v1_1 (2018.3) with a ZYNQ to use the lwip211_v1_2 (2020.1) with an Ultrascale MPSoC. When compiling the platform project I see the following warning:

comparison is always true due to limited range of data type [-Wtype-limits] tcp.c /platform/psu_cortexa53_0/standalone_domain/bsp/psu_cortexa53_0/libsrc/lwip211_v1_2/src/lwip-2.1.1/src/core line 992 C/C++ Problem

It involves these two lines (992 and 996) in tcp.c

srojas_0-1611591211271.png

 

This is because tcpwnd_size_t is defined as u16_t in tcpbase.h and TCP_WND_MAX(pcb) as TCP_WND in tcp.h

tcpbase.h

srojas_1-1611591300064.png

tcp.h

Screenshot 2021-01-25 172631.png

Since I previosly had configured the WND size in BSP (lwipopts.h) as

 

#define TCP_WND 65535

 

I was wondering if I should ignore this warning or if I should activate LWIP_WND_SCALE to use u32_t for tcpwnd_size_t .

Does anyone have an idea?

Thanks.

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
nanz
Moderator
Moderator
251 Views
Registered: ‎08-25-2009

Hi @srojas ,

I believe this can be safely ignored! Do you see any unexpected behaviour caused by this warning? 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
nanz
Moderator
Moderator
252 Views
Registered: ‎08-25-2009

Hi @srojas ,

I believe this can be safely ignored! Do you see any unexpected behaviour caused by this warning? 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
srojas
Observer
Observer
242 Views
Registered: ‎05-20-2019

Hi @nanz 

Thank you for the response.

Until now I have not seen any unexpected behavior. For now, I'm not been transmitting too much data.

Kind Regards