[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F63CE5A.2090809@nod.at>
Date: Sat, 17 Mar 2012 00:35:54 +0100
From: Richard Weinberger <richard@....at>
To: Joe Perches <joe@...ches.com>
CC: apw@...onical.com, linux-kernel@...r.kernel.org, hpa@...or.com
Subject: Re: [PATCH] checkpatch.pl: Check for functions without a real prototype
Am 17.03.2012 00:31, schrieb Joe Perches:
> Perhaps this should be:
> if ($line =~ /(\b$Type\s+$Ident)\s*\(\s*\)/) {
Makes sense.
>> + ERROR("FUNCTION_NO_PROTOTYPE",
>> +"Function without a real prototype\n" . $herecurr .
>
> Sensible, but maybe:
> "Bad function definition - $1() should probably be $1(void)\n"
Too.
>> +"Thou shalt not, in the language of C, under any circumstances, on the
>> +pain of death, declare or define a function with an empty set of
>> +parentheses, for though in the language of C++ it meaneth the same as
>> +(void), in C it meaneth (...) which is of meaningless as there be no
>> +anchor argument by which the types of the varadic arguments can be
>> +expressed, and which misleadeth the compiler into allowing unsavory code
>> +and in some cases generate really ugly stuff for varadic handling.
>> + -hpa\n");
>
> Humorous once, painful in twice, annoying after.
>
It has to be annoying and painful. :-)
Thanks,
//richard
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists