Home arrow Support arrow Forums

Luminary Micro Forums

irmus

Fresh Boarder

2008/11/18 20:40

notice about lwip-1.3.0 patch

Hi~
I'm using LM3S8962 ev kit with StellarisWare ver 3618.
When I build a enet_lwip example, I get a warning message from compiler.

Code:

  ../../../utils/../third_party/lwip-1.3.0/src/netif/etharp.c:708errordereferencing type-punned pointer will break strict-aliasing rules


(I'm using GNU compiler "CodeSourcery G++ Lite" so don't know how other compilers say)

So I googled this message and found a patch about it. It works fine.
Here is a URL about the patch.
http://www.nabble.com/-PATCH--Fix-aliasing-violation.-td19794741.html
Just a 1 line replacement.
Code:

  #if 0       hdr->sipaddr = *(struct ip_addr2 *)&netif->ip_addr; #else       SMEMCPY(&hdr->sipaddr, &netif->ip_addrsizeof(hdr->sipaddr)); #endif

login or register to reply

kstokes1

Junior Boarder

2008/12/14 13:09

Re:notice about lwip-1.3.0 patch

Thanks for posting this, I also am using Code Sourcery and plan to add lwip to my app soon.

-Kevin

login or register to reply