From owner-freebsd-current Wed Jan 27 18:50:03 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA23557 for freebsd-current-outgoing; Wed, 27 Jan 1999 18:50:03 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from bright.fx.genx.net (bright.fx.genx.net [206.64.4.154]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA23484 for ; Wed, 27 Jan 1999 18:50:00 -0800 (PST) (envelope-from bright@hotjobs.com) Received: from localhost (bright@localhost) by bright.fx.genx.net (8.9.1/8.9.1) with ESMTP id VAA19805; Wed, 27 Jan 1999 21:56:39 -0500 (EST) (envelope-from bright@hotjobs.com) X-Authentication-Warning: bright.fx.genx.net: bright owned process doing -bs Date: Wed, 27 Jan 1999 21:56:39 -0500 (EST) From: Alfred Perlstein X-Sender: bright@bright.fx.genx.net To: Archie Cobbs cc: current@FreeBSD.ORG Subject: Re: kern/subr_scanf array index of signed char In-Reply-To: <199901280222.SAA20135@bubba.whistle.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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