Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2017 11:54:53 +0000
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        Eitan Adler <eadler@FreeBSD.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee
Message-ID:  <20171205115453.GA87559@freefall.freebsd.org>
In-Reply-To: <20171205084345.GR2272@kib.kiev.ua>
References:  <201712050355.vB53tApl074041@repo.freebsd.org> <20171205084345.GR2272@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 05, 2017 at 10:43:45 +0200, Konstantin Belousov wrote:
> On Tue, Dec 05, 2017 at 03:55:10AM +0000, Eitan Adler wrote:
> > Author: eadler
> > Date: Tue Dec  5 03:55:10 2017
> > New Revision: 326554
> > URL: https://svnweb.freebsd.org/changeset/base/326554

[...]

> > Added: head/usr.bin/sponge/sponge.c
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> > --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> > +++ head/usr.bin/sponge/sponge.c	Tue Dec  5 03:55:10 2017	(r326554)

[...]

> > +	while (bufremain > 0) {
> > +		whichbuf =3D (bufremain < maxiovec) ? bufremain : maxiovec;
> > +		bufremain -=3D whichbuf;
> > +
> > +		i =3D writev(fd, iov, whichbuf);
> > +		if (i < 0) {
> > +			err(1, "failed to write");
> > +		}
> > +	}
> This loop is nonsensical.

Also breaks build:

/usr/src/usr.bin/sponge/sponge.c:175:25: error: comparison of integers of d=
ifferent signs: 'size_t' (aka 'unsigned long') and 'long' [-Werror,-Wsign-c=
ompare]
                whichbuf =3D (bufremain < maxiovec) ? bufremain : maxiovec;
                            ~~~~~~~~~ ^ ~~~~~~~~
1 error generated.

Ref: https://ci.freebsd.org/job/FreeBSD-head-amd64-build/6187/console

Please check this.

Thanks,
Li-Wen

--=20
Li-Wen Hsu <lwhsu@FreeBSD.org>
https://lwhsu.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171205115453.GA87559>