trema / trema-edge

Transient repository for Trema OF1.3 branch
27 stars 14 forks source link

Fix build error with GCC 4.8.1 #81

Closed kaishuu0123 closed 10 years ago

kaishuu0123 commented 11 years ago

other functions are using "sizeof( flow_table )". I have rewritten follow it.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
$ gcc --version
gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(snip)
/home/kaishuu0123/trema-edge/src/switch/datapath/flow_table.c: In function ‘init_flow_table’:
/home/kouki-o/trema-edge/src/switch/datapath/flow_table.c:318:27: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
   memset( table, 0, sizeof( table ) );
                           ^
rake aborted!
gcc failed
coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 57c1441b9adc51cf16bfc1711d25736193aedb31 on kaishuu0123:master into b9332ffda1a3e0dc9c4a91aa98979f3fbadc7b75 on trema:master.

hkwi commented 10 years ago

It looks good to me.