lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #49827] wrong cast to size_t on 16-bit x86 architectur


From: Ambroz Bizjak
Subject: [lwip-devel] [bug #49827] wrong cast to size_t on 16-bit x86 architecture
Date: Mon, 12 Dec 2016 21:14:10 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36

Follow-up Comment #9, bug #49827 (project lwip):

Hi,

What exactly is the problem with just casting to void*?

sys_timeout(lwip_cyclic_timers[i].interval_ms, cyclic_timer,
(void*)&lwip_cyclic_timers[i]);

Here's an extract from ANSI C which says it's OK:

"A pointer to void may be converted to or from a pointer to any
incomplete or object type.  A pointer to any incomplete or object type
may be converted to a pointer to void and back again; the result shall
compare equal to the original pointer."

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?49827>

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




reply via email to

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