Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 2015 17:14:54 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Allan Jude <allanjude@freebsd.org>
Cc:        Benjamin Kaduk <bjkfbsd@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r284644 - head/usr.sbin/fstyp
Message-ID:  <A4B3F816-1CFD-48B1-93AA-F0EAC47D42FC@FreeBSD.org>
In-Reply-To: <5585820C.4000209@freebsd.org>
References:  <201506201503.t5KF33Km091795@svn.freebsd.org> <CAJ5_RoBR-sKyTYTkmFx1tXiyvxc0rR37fPaOLF_UNHGognR_WQ@mail.gmail.com> <5585820C.4000209@freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On 20 Jun 2015, at 17:09, Allan Jude <allanjude@freebsd.org> wrote:
> 
> On 2015-06-20 11:05, Benjamin Kaduk wrote:
...
>> Are the warnings emitted by gcc posted somewhere so that I can convince
>> myself dropping WARNS is better than changing the code to work around them?
>> 
>> -Ben
> 
> The warnings come from the ZFS contrib code, so I was under the
> impression we didn't want to fix those and diverge form upstream.
> 
> via kib on irc:
> 
> ===> usr.sbin/fstyp (all)
> cc1: warnings being treated as errors
> In file included from
> /scratch/tmp/kib/src/usr.sbin/fstyp/../../sys/cddl/contrib
>                 from /scratch/tmp/kib/src/usr.sbin/fstyp/zfs.c:41:
> n/fs/zfs/sys/dmu.h:638: warning: function declaration isn't a prototype
> n/fs/zfs/sys/dmu.h:639: warning: function declaration isn't a prototype

Those functions are declared like this, without any parameters, as if
they were K&R functions:

void xuio_stat_wbuf_copied();
void xuio_stat_wbuf_nocopy();

and also their definitions lack any parameters:

void
xuio_stat_wbuf_copied()
{
        XUIOSTAT_BUMP(xuiostat_wbuf_copied);
}

void
xuio_stat_wbuf_nocopy()
{
        XUIOSTAT_BUMP(xuiostat_wbuf_nocopy);
}

Obviously, these should just have (void) as their parameter list.  For
such a trivial change, it should be no problem to modify it locally, and
then notify upstream.

-Dimitry


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.27

iEYEARECAAYFAlWFg3cACgkQsF6jCi4glqPrUACeOl26oJdE/H7n820Bjkckmq+r
heEAn1L60F7mnFJ7Pb37bwwoLoCxOXWs
=RUIB
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A4B3F816-1CFD-48B1-93AA-F0EAC47D42FC>