lwip-devel
[Top][All Lists]
Advanced

[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:30:02 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4

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

> Wouldn't it remove the warning that started this post?
Do we need to remove that warning? The warning says "Constant out of range in
comparison", and I am struggling to understand what it actually means. I
believe gcc would say "comparison is always false due to limited range of data
type", which is exactly what we want from this code. It is wrong to silence
every warning of every compiler. The cost of silencing a warning is not zero:
code readability could suffer, and there is a risk of intruducing new bugs
(which almost happened in this case.)

> It's also marginally more efficient to leave ints and unsigned ints...
I believe the proper solution would be to use C99 types from stdint.h like
uint_fast16_t or equivalent.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6699>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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