lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #10155] cleanup for static code checker in tcp_in.c


From: Simon Goldschmidt
Subject: [lwip-devel] [patch #10155] cleanup for static code checker in tcp_in.c
Date: Tue, 7 Dec 2021 08:52:58 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

Follow-up Comment #1, patch #10155 (project lwip):

I'm curious, what kind of code checker is this? And what's the exact message?
Is it satisfied after applying that patch?

I'm not aware of the code being a problem. What I *do* know is that per C
standard, a line like

some_uint16_t |= some_uint8_t;

can give warnings because you *downsize* a result, because this is effectively
a shortcut for 

some_uint16_t = (some_uint16_t | some_uint8_t);

where the right hand side is promoted to 'int' after the '|' operator.

I don't know what would be wrong with ORing an uint16_t and an uint8_t,
though. Does the "non-shortcut" version produce the same warning in your code
checker?

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?10155>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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