[ovs-dev] [sparse 0/4] fix sparse complaints

Jesse Gross jesse at nicira.com
Tue Dec 28 17:37:42 UTC 2010


On Tue, Dec 28, 2010 at 12:21 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Tue, Dec 28, 2010 at 12:35:24AM -0500, Jesse Gross wrote:
>> On Tue, Dec 28, 2010 at 12:20 AM, Ben Pfaff <blp at nicira.com> wrote:
>> > On Mon, Dec 27, 2010 at 9:14 PM, Jesse Gross <jesse at nicira.com> wrote:
>> >> On Mon, Dec 27, 2010 at 6:38 PM, Ben Pfaff <blp at nicira.com> wrote:
>> >>> This series fixes various issues that sparse complained about.  None
>> >>> of them is a bug fix, but all of them seemed worth fixing.
>> >>
>> >> Hmm, I guess that I should turn up the warning level when I run sparse.
>> >
>> > I just built passing "C=1" to the "make" process, so I didn't do anything
>> > special.  Are you running it some other way?
>>
>> No, that's how I run it as well (sometimes also with
>> CF="-D__CHECK_ENDIAN__").  Running that against master I don't see any
>> warnings (with the exception of some RCU checks that were added in
>> 2.6.37 that I'll send out patches for soon).  If I add -Wsparse-all
>> then I see the issues mentioned here.
>
> I wonder why the two of us see different behavior.  Maybe something
> changed after 2.6.36?  (I most commonly compile against what Linus has
> tagged as v2.6.36.)

I'm compiling against net-next but I also sometimes use 2.6.35 and I
don't see the warnings there either.  What does your man page say for
these warnings?  For example, on mine under -Wcast-to-as, it says that
the warnings are not enabled by default and I don't see them.  The
other potential source of difference is the flags that the kernel
build system passes.  On mine in the Makefile there is:
CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
                  -Wbitwise -Wno-return-void $(CF)




More information about the dev mailing list