linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bogus 'not declared' warning
@ 2007-10-23 14:24 Matthew Wilcox
  2007-10-23 19:23 ` Josh Triplett
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2007-10-23 14:24 UTC (permalink / raw)
  To: linux-sparse


Seems to me that sparse ignores 'static' forward declarations, leading
to false warnings like this:

/home/willy/kernel/linux-2.6/drivers/scsi/sym53c8xx_2/sym_hipd.c:3786:5: warning: symbol 'sym_compute_residual' was not declared. Should it be static?

$ grep -n sym_compute_residual drivers/scsi/sym53c8xx_2/*
drivers/scsi/sym53c8xx_2/sym_hipd.c:61:static int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp);
drivers/scsi/sym53c8xx_2/sym_hipd.c:3033:               cp->sv_resid = sym_compute_residual(np, cp);
drivers/scsi/sym53c8xx_2/sym_hipd.c:3786:int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp)

This is a self-built sparse from commit
fa7d792f66cf02b86dd834d06b267ec66ddfe700.  The two commits since don't
appear relevant.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-13 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 14:24 Bogus 'not declared' warning Matthew Wilcox
2007-10-23 19:23 ` Josh Triplett
2007-11-13 12:13   ` Josh Triplett

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).