* Warn for extern prototypes
@ 2014-04-30 20:07 Sam Ravnborg
2014-04-30 20:30 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2014-04-30 20:07 UTC (permalink / raw)
To: sparse
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Warn for extern prototypes
2014-04-30 20:07 Warn for extern prototypes Sam Ravnborg
@ 2014-04-30 20:30 ` Dan Carpenter
2014-04-30 20:48 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-04-30 20:30 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: sparse
On Wed, Apr 30, 2014 at 10:07:30PM +0200, Sam Ravnborg wrote:
> 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.
Doesn't checkpatch.pl already check for this?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Warn for extern prototypes
2014-04-30 20:30 ` Dan Carpenter
@ 2014-04-30 20:48 ` Sam Ravnborg
0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2014-04-30 20:48 UTC (permalink / raw)
To: Dan Carpenter; +Cc: sparse
On Wed, Apr 30, 2014 at 11:30:57PM +0300, Dan Carpenter wrote:
> On Wed, Apr 30, 2014 at 10:07:30PM +0200, Sam Ravnborg wrote:
> > 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.
>
> Doesn't checkpatch.pl already check for this?
checkpatch --strict -f foo.h will include this check.
But then there are so much other noise...
It is much simpler to do:
make C=2 arch/sparc/
and the process the sparse warnings.
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-30 20:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 20:07 Warn for extern prototypes Sam Ravnborg
2014-04-30 20:30 ` Dan Carpenter
2014-04-30 20:48 ` Sam Ravnborg
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).