kayws426 / embox

Automatically exported from code.google.com/p/embox
0 stars 1 forks source link

netfilter compilation warning #587

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

netfilter.c:35
addr_is_eq = memcmp(addr, &r->addr, sizeof addr) == 0;

gcc 4.8.0 complaining for third argument:

src/net/ipv4/netfilter.c:35:46: error: argument to 'sizeof' in 'memcmp' call is 
the same expression as the first source; did you mean to dereference it? 
[-Werror=sizeof-pointer-memaccess]
   addr_is_eq = memcmp(addr, &r->addr, sizeof addr) == 0;

Original issue reported on code.google.com by drakon.m...@gmail.com on 2 Apr 2013 at 8:44

GoogleCodeExporter commented 9 years ago
oops. thanks. fixed by r9414

Original comment by ki.stfu on 2 Apr 2013 at 8:56

GoogleCodeExporter commented 9 years ago
i'm lucky. sizeof addr and sizeof *addr are same))

Original comment by ki.stfu on 2 Apr 2013 at 8:58