Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 1999 21:56:39 -0500 (EST)
From:      Alfred Perlstein <bright@hotjobs.com>
To:        Archie Cobbs <archie@whistle.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: kern/subr_scanf array index of signed char
Message-ID:  <Pine.BSF.4.05.9901272143350.81323-100000@bright.fx.genx.net>
In-Reply-To: <199901280222.SAA20135@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 27 Jan 1999, Archie Cobbs wrote:

> Alfred Perlstein writes:
> > avoids a warning.
> 
> No it doesn't. The "(unsigned char)" avoids the warning:
> 
>   $ cat > foo.c
>   int foo(int *array, unsigned char index)  { return array[index]; } 
>   $ gcc -c -Wall -o foo foo.c
>   $

doh' yes, it is when you use a signed char that i've had warnings.



-Alfred


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901272143350.81323-100000>