Date: Mon, 2 May 2016 08:32:12 -0700 From: Conrad Meyer <cem@FreeBSD.org> To: "Bjoern A. Zeeb" <bz@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298924 - head/usr.bin/sdiff Message-ID: <CAG6CVpUUNW-LN7F117yfH1-zZVVSoaxMULiLS6ApfD%2BinPSEFg@mail.gmail.com> In-Reply-To: <201605021507.u42F7hI3029685@repo.freebsd.org> References: <201605021507.u42F7hI3029685@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Clang should really catch this too. Why didn't it? Best, Conrad On Mon, May 2, 2016 at 8:07 AM, Bjoern A. Zeeb <bz@freebsd.org> wrote: > Author: bz > Date: Mon May 2 15:07:43 2016 > New Revision: 298924 > URL: https://svnweb.freebsd.org/changeset/base/298924 > > Log: > fgetc returns an int not a char. > > Found by: powerpc builds failing due to comparing with EOF raised: > "comparison is always false due to limited range of data type" > > Modified: > head/usr.bin/sdiff/sdiff.c > > Modified: head/usr.bin/sdiff/sdiff.c > ============================================================================== > --- head/usr.bin/sdiff/sdiff.c Mon May 2 14:35:57 2016 (r298923) > +++ head/usr.bin/sdiff/sdiff.c Mon May 2 15:07:43 2016 (r298924) > @@ -508,8 +508,7 @@ binexec(char *diffprog, char *f1, char * > static int > istextfile(FILE *f) > { > - int i; > - char ch; > + int ch, i; > > if (f == NULL) > return (1); >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpUUNW-LN7F117yfH1-zZVVSoaxMULiLS6ApfD%2BinPSEFg>