Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2018 09:58:04 -0800
From:      John Baldwin <jhb@freebsd.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        Benno Rice <benno@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r329269 - head/stand/i386/boot2
Message-ID:  <2488298.mWgVtp3Hqz@ralph.baldwin.cx>
In-Reply-To: <20180216164445.GB55620@raichu>
References:  <201802141807.w1EI7Ror036078@repo.freebsd.org> <20180216164445.GB55620@raichu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, February 16, 2018 11:44:45 AM Mark Johnston wrote:
> On Wed, Feb 14, 2018 at 06:07:27PM +0000, Benno Rice wrote:
> > Author: benno
> > Date: Wed Feb 14 18:07:27 2018
> > New Revision: 329269
> > URL: https://svnweb.freebsd.org/changeset/base/329269
> > 
> > Log:
> >   Reformat to come significantly closer to style(9).
> >   
> >   Reviewed by:		imp, jhibbits
> >   Differential Revision:	https://reviews.freebsd.org/D14366
> > 
> > Modified:
> >   head/stand/i386/boot2/boot2.c
> > 
> > Modified: head/stand/i386/boot2/boot2.c
> > ==============================================================================
> > --- head/stand/i386/boot2/boot2.c	Wed Feb 14 18:05:37 2018	(r329268)
> > +++ head/stand/i386/boot2/boot2.c	Wed Feb 14 18:07:27 2018	(r329269)
> > [...]
> >  #if SERIAL
> > -		} else if (c == 'S') {
> > -		    j = 0;
> > -		    while ((unsigned int)(i = *arg++ - '0') <= 9)
> > -			j = j * 10 + i;
> > -		    if (j > 0 && i == -'0') {
> > -			comspeed = j;
> > -			break;
> > -		    }
> > -		    /* Fall through to error below ('S' not in optstr[]). */
> > +				} else if (c == 'S') {
> > +					j = 0;
> > +					while (*arg <= '9') {
> > +						i = (unsigned int)(*arg - '0');
> > +						j = j * 10 + i;
> > +						arg++;
> > +					}
> > +					if (j > 0 && i == -'0') {
> > +						comspeed = j;
> > +						break;
> > +					}
> 
> The gcc build is failing now with a claim that "i" may be used
> uninitialized in the if-statement above. It looks like a bogus error
> though.

If this commit mixed functional changes with the reindent it needs to be
reverted and the reindent needs to be re-committed as a separate commit.

The functional changes (if intended) should then be a separate commit once
they are tested.

-- 
John Baldwin



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