CURRENT: /usr/src/sbin/newfs_nandfs/newfs_nandfs.c:89:18: error: no previous extern declaration for non-static variable

O. Hartmann ohartman at zedat.fu-berlin.de
Mon Apr 22 21:53:46 UTC 2013


On Mon, 2013-04-22 at 00:09 +0200, Ed Schouten wrote:
> Hi,
> 
> 2013/4/21 O. Hartmann <ohartman at zedat.fu-berlin.de>:
> > /usr/src/sbin/newfs_nandfs/newfs_nandfs.c:83:18: error: no previous
> > extern declaration for non-static variable
> > 'user_files' [-Werror,-Wmissing-variable-declarations]
> > struct file_info user_files[] =
> >                  ^
> 
> The following patch should fix this:
> 
> http://80386.nl/pub/nandfs-warns-6.txt
> 
> As of a couple of days ago, WARNS=6 requires that global variables
> either have an external declaration or are marked static. As
> newfs_nandfs only consists of a single C file, we can easily mark
> these variables static. In this specific case it allowed the compiler
> to find another peculiarity in the code, namely that the
> seg_segsum_size variable is unused.
> 
> I'll commit this patch after I've done some testing.
> 
> Thanks,
> --
> Ed Schouten <ed at 80386.nl>

Thank you very much.

Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130422/19845c67/attachment.sig>


More information about the freebsd-current mailing list