lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP : Get rid of warnings when LWIP_NOASSERT is on


From: Dirk Ziegelmeier
Subject: Re: [lwip-users] LWIP : Get rid of warnings when LWIP_NOASSERT is on
Date: Mon, 19 Dec 2016 10:50:56 +0100

I don't get these warnings on any compiler that I use (gcc linux, arm-none-eabi-gcc, clang, VS2010) and the code looks OK to me.

Since all parentheses you added are around arguments passed to lwip_htons(), I suspect you may have overridden this macro and the problem is somewhere in its definition?

Dirk

--
Dirk Ziegelmeier * address@hidden * http://www.ziegelmeier.net

On Mon, Dec 19, 2016 at 9:00 AM, adityapr <address@hidden> wrote:
Hi Dirk,

Since we are already at this issue, there are a couple of warnings that I
would also like to report.
In tcp.h:
 - #define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags)
(phdr)->_hdrlen_rsvd_flags = htons(((len) << 12) | (flags))
+ #define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags) (phdr)->_hdrlen_rsvd_flags
= htons((((len) << 12) | (flags)))
and in tcp_out.c
- TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
+TCPH_FLAGS_SET(tcphdr, ((TCP_ACK) | (TCP_FIN)));

These lines give warning for parenthesis in arm-none-eabi-gcc compiler. It
would be nice if these warnings are fixed with those as well.

Regards
Aditya



--
View this message in context: http://lwip.100.n7.nabble.com/LWIP-Get-rid-of-warnings-when-LWIP-NOASSERT-is-on-tp28201p28205.html
Sent from the lwip-users mailing list archive at Nabble.com.

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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