Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2013 00:09:10 +0200
From:      Ed Schouten <ed@80386.nl>
To:        "O. Hartmann" <ohartman@zedat.fu-berlin.de>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: CURRENT: /usr/src/sbin/newfs_nandfs/newfs_nandfs.c:89:18: error: no previous extern declaration for non-static variable
Message-ID:  <CAJOYFBBqkabQwcK_JJ3_pVtEhC-%2BdEte8rn9MwOyi_kMm7Qufg@mail.gmail.com>
In-Reply-To: <1366574922.38339.59.camel@thor.walstatt.dyndns.org>
References:  <1366574922.38339.59.camel@thor.walstatt.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

2013/4/21 O. Hartmann <ohartman@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@80386.nl>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJOYFBBqkabQwcK_JJ3_pVtEhC-%2BdEte8rn9MwOyi_kMm7Qufg>