Thread (5 messages) 5 messages, 4 authors, 2004-06-09

Re: [PATCH] tiny patch to kill warning in drivers/ide/ide.c

From: Andreas Dilger <hidden>
Date: 2004-06-09 02:33:18
Also in: lkml

On Jun 09, 2004  03:38 +0200, Jesper Juhl wrote:
drivers/ide/ide.c: In function `ide_unregister_subdriver':
drivers/ide/ide.c:2216: warning: implicit declaration of function `pnpide_init'

I added a simple declaration of pnpide_init to drivers/ide/ide.c

Here's a patch against 2.6.7-rc3 - please consider including it (or if
that's not the way to do it, then don't) :)
Better to add the declaration into a header like linux/ide.h that is
included into both ide.c and ide-pnp.c so that when/if pnpide_init()
ever changes its prototype you will get a warning during compilation.

The only good reason to have declarations within .c files is for forward
declarations of functions only used in the same file.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/                 http://members.shaw.ca/golinux/

Attachments

  • (unnamed) [application/pgp-signature] 189 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help