hi,
> On Wed, Apr 13, 2011 at 12:37:28PM +0900, YAMAMOTO Takashi wrote:
>> commit bb5bc6c042a22103612205483558f472f8929356
>> Author: Ben Pfaff <[email protected]>
>> Date: Mon Mar 21 14:30:33 2011 -0700
>>
>> lacp: Encapsulate configuration into new structs.
>>
>> This makes it easier to pass configuration between modules.
>>
>> this commit made some range checks useless.
>
> Can you post all of the warnings? I don't get any of these with my
> compiler.
actually there seems to be only a single instance related to the change.
YAMAMOTO Takashi
% cc -v
Using built-in specs.
Target: i486--netbsdelf
Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc4/configure
--target=i486--netbsdelf --enable-long-long --enable-threads
--enable-__cxa_atexit --with-arch=i486 --with-tune=nocona --disable-multilib
--disable-symvers --build=x86_64-unknown-netbsd5.0. --host=i486--netbsdelf
Thread model: posix
gcc version 4.1.3 20080704 prerelease (NetBSD nb2 20081120)
% grep -B5 range log
lib/ofp-parse.c:828: warning: array subscript has type 'char'
depbase=`echo lib/ofp-print.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I ./include -I ./lib -I ./lib
-Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith
-Wdeclaration-after-statement -Wformat-security -Wswitch-enum
-Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-Wmissing-field-initializers -g -O2 -MT lib/ofp-print.o -MD -MP -MF
$depbase.Tpo -c -o lib/ofp-print.o lib/ofp-print.c &&\
mv -f $depbase.Tpo $depbase.Po
lib/ofp-print.c: In function 'ofp_print_nx_action':
lib/ofp-print.c:240: warning: comparison is always true due to limited range of
data type
--
lib/ofp-print.c:617: warning: array subscript has type 'char'
depbase=`echo lib/ofp-util.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I ./include -I ./lib -I ./lib
-Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith
-Wdeclaration-after-statement -Wformat-security -Wswitch-enum
-Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-Wmissing-field-initializers -g -O2 -MT lib/ofp-util.o -MD -MP -MF
$depbase.Tpo -c -o lib/ofp-util.o lib/ofp-util.c &&\
mv -f $depbase.Tpo $depbase.Po
lib/ofp-util.c: In function 'check_nicira_action':
lib/ofp-util.c:1973: warning: comparison is always false due to limited range
of data type
--
gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith
-Wdeclaration-after-statement -Wformat-security -Wswitch-enum
-Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-Wmissing-field-initializers -g -O2 -export-dynamic -o tests/test-byte-order
tests/test-byte-order.o lib/libopenvswitch.a -lm
depbase=`echo vswitchd/bridge.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I ./include -I ./lib -I ./lib
-Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith
-Wdeclaration-after-statement -Wformat-security -Wswitch-enum
-Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-Wmissing-field-initializers -g -O2 -MT vswitchd/bridge.o -MD -MP -MF
$depbase.Tpo -c -o vswitchd/bridge.o vswitchd/bridge.c &&\
mv -f $depbase.Tpo $depbase.Po
vswitchd/bridge.c: In function 'port_reconfigure_bond_lacp':
vswitchd/bridge.c:3034: warning: comparison is always false due to limited
range of data type
>
> Thanks,
>
> Ben.
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss