public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] checkpatch: warn on declaration with storage class not
Date: Fri, 21 May 2010 07:13:48 +0000	[thread overview]
Message-ID: <20100521091348.19ba1bcb@hyperion.delvare> (raw)
In-Reply-To: <1274368733-4386-1-git-send-email-tklauser@distanz.ch>

On Thu, 20 May 2010 17:18:53 +0200, Tobias Klauser wrote:
> The C99 specification states in section 6.11.5:
> 
> The placement of a storage-class specifier other than at the beginning
> of the declaration specifiers in a declaration is an obsolescent
> feature.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> Cc: Jean Delvare <khali@linux-fr.org>

Acked-by: Jean Delvare <khali@linux-fr.org>

> ---
>  scripts/checkpatch.pl |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index f2bbea9..4921473 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2586,6 +2586,11 @@ sub process {
>  			CHK("architecture specific defines should be avoided\n" .  $herecurr);
>  		}
>  
> +# Check that the storage class is at the beginning of a declaration
> +		if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
> +			WARN("storage class should be at the beginning of the declaration\n" . $herecurr)
> +		}
> +
>  # check the location of the inline attribute, that it is between
>  # storage class and type.
>  		if ($line =~ /\b$Type\s+$Inline\b/ ||


-- 
Jean Delvare

      reply	other threads:[~2010-05-21  7:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20 15:18 [PATCH] checkpatch: warn on declaration with storage class not at the beginning Tobias Klauser
2010-05-21  7:13 ` Jean Delvare [this message]

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=20100521091348.19ba1bcb@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=kernel-janitors@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