Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2018 11:44:45 -0500
From:      Mark Johnston <markj@FreeBSD.org>
To:        Benno Rice <benno@FreeBSD.org>
Cc:        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:  <20180216164445.GB55620@raichu>
In-Reply-To: <201802141807.w1EI7Ror036078@repo.freebsd.org>
References:  <201802141807.w1EI7Ror036078@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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