[Top][All Lists]

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

[lwip-devel] [patch #6699] Fixing a couple of compilation warnings(Parad

From: Mike Kleshov
Subject: [lwip-devel] [patch #6699] Fixing a couple of compilation warnings(Paradigm C++)
Date: Mon, 22 Dec 2008 16:59:43 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/2008102920 Firefox/3.0.4

Follow-up Comment #13, patch #6699 (project lwip):

> The int can't be 0xFFFF.
Now I see it... Still, I think the wording of this warning is a bit vague...

> Sure, it's always false, but it's also bad coding style
I suppose adding an explicit check for size of int would be more readable
than relying on the if statement to reduce to 'always false' on 16-bit
platforms. Something like this should work:
#include <limits.h>
#if UINT_MAX > 0xffffu

> That will break the code on many 8- and 16-bit compilers that are not C99
It won't if you define roll-your-own types like it's currently done with
u8_t, u16_t and so on.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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