lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] lwip/src/core/tcp.c:622: error: comparison is always false


From: bekanosky
Subject: [lwip-users] lwip/src/core/tcp.c:622: error: comparison is always false due to limited range of data type
Date: Fri, 29 Apr 2011 16:55:08 +0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

Hello All.
I try to compile unixsim from contrib.
And i get error message as mentioned in the subject of my email.
By deleting '-Werror' from Makefile, the compilation goes fine.

The code in question is:
if (++port > TCP_LOCAL_PORT_RANGE_END) {
    port = TCP_LOCAL_PORT_RANGE_START;
}

Can we change the code to:
if (port == TCP_LOCAL_PORT_RANGE_END) {
    port = TCP_LOCAL_PORT_RANGE_START;
  }
  else
        port++;


Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]