From: Richard Weinberger <richard@nod.at>
To: Joe Perches <joe@perches.com>
Cc: apw@canonical.com, linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [PATCH] checkpatch.pl: Check for functions without a real prototype
Date: Sat, 17 Mar 2012 00:35:54 +0100 [thread overview]
Message-ID: <4F63CE5A.2090809@nod.at> (raw)
In-Reply-To: <1331940707.12813.10.camel@joe2Laptop>
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2012-03-16 23:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 20:18 [PATCH] x86: Merge x86_32 and x86_64 cpu_idle() Richard Weinberger
2012-03-16 21:22 ` H. Peter Anvin
2012-03-16 21:40 ` [PATCH v2] " Richard Weinberger
2012-03-19 13:05 ` Frederic Weisbecker
2012-03-23 12:25 ` Ingo Molnar
2012-03-23 12:31 ` Richard Weinberger
2012-03-23 12:33 ` Ingo Molnar
2012-03-23 18:20 ` [PATCH] " Richard Weinberger
2012-03-24 7:25 ` Ingo Molnar
2012-03-25 21:00 ` Richard Weinberger
2012-03-26 15:31 ` [tip:x86/urgent] x86: Merge the x86_32 and x86_64 cpu_idle() functions tip-bot for Richard Weinberger
2012-03-16 23:04 ` [PATCH] checkpatch.pl: Check for functions without a real prototype Richard Weinberger
2012-03-16 23:31 ` Joe Perches
2012-03-16 23:35 ` Richard Weinberger [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-11-18 22:31 Richard Weinberger
2013-11-18 22:36 ` Joe Perches
2013-11-18 22:40 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F63CE5A.2090809@nod.at \
--to=richard@nod.at \
--cc=apw@canonical.com \
--cc=hpa@zytor.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox