svn commit: r329269 - head/stand/i386/boot2

Mark Johnston markj at FreeBSD.org
Fri Feb 16 16:44:49 UTC 2018


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.


More information about the svn-src-head mailing list