linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: sparse <linux-sparse@vger.kernel.org>
Subject: Warn for extern prototypes
Date: Wed, 30 Apr 2014 22:07:30 +0200	[thread overview]
Message-ID: <20140430200730.GA11100@ravnborg.org> (raw)

Hi all.

Is it possible to get a warning when sparse encounter a
function prototype declared using "extern"?

So the following code:

extern void foo(void);
void bar(int x);

Would generate warnings because the declaration of foo()
uses extern.


I took a very short peek at evaluate.c - but decided to ask as maybe
there is already something that I overlooked or it is maybe trivial.

The rationale behind this is that at least in some areas of the kernel,
the use of "extern" for prototypes are no longer accepted.
A sparse warnings would be good to tell me all the cases I missed
in the conversion.

	Sam

             reply	other threads:[~2014-04-30 20:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 20:07 Sam Ravnborg [this message]
2014-04-30 20:30 ` Warn for extern prototypes Dan Carpenter
2014-04-30 20:48   ` Sam Ravnborg

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=20140430200730.GA11100@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-sparse@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;
as well as URLs for NNTP newsgroup(s).