Re: fs/fat - fix sparse warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 31, 2005 at 11:15:34PM +0900, OGAWA Hirofumi wrote:
> Ben Dooks <[email protected]> writes:
> 
> > move fat_cache_init/fat_cache_destroy to a common
> > header file in fs/fat so that inode.c and cache.c
> > see the same definition, and to stop warnings
> > from sparse about undeclared functions
> 
> The fs/fat/* has many internal functions, it is in
> include/linux/msdos_fs.h.  Please move those internal functions to one
> internal header (probably fs/fat/fat.h?).
> 
> This seems be just for sparse, please do real cleanup instead.

It's not only for sparse.

The -Wmissing-prototypes flag to gcc gives similar warnings, and I'm 
also cleaning up code for adding this flag to the CFLAGS.

Why?

It sometimes happens that the signature of a function changes and it is 
forgotten to update all prototypes.

If the prototype is in a header file, gcc tells about the mistake.

If the prototype is in the C file gcc can't help us and it might take 
some time until someone tracks the source of the nasty runtime problems 
this might cause.

It's your choice as subsystem maintainer which header file the 
prototypes should go into - it is only important that both the file with 
the actual function and all users of this function #include this header.

> OGAWA Hirofumi <[email protected]>

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux