Re: [PATCH] Add -Wnon-ansi-function-declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 30, 2018 at 09:45:47AM +0000, John Levon wrote:
> On Fri, Nov 30, 2018 at 01:13:36AM +0100, Luc Van Oostenryck wrote:
> 
> > I possible, we reuse for sparse the same option names than for
> > GCC and here this new -Wnon-ansi-function-declaration option
> > more or less covers GCC's -Wold-style-definition and 
> > -Wstrict-protoypes.
> 
> Understood, that makes sense. Your patches look good to me.
> 
> On a related note, one problem we have is that we have some legacy code
> like:
> 
> int foo(a, b)
> 	int a;
> {
> 	if (b)
> 		return a;
> }
> 
> sparse quite right complains about not having any clue as to what "b"
> is. At the moment I just have it turned off for such code, as it's
> thankfully a minority.

GCC uses -Wimplicit-int for this. I'm adding this one too.

-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux