From owner-freebsd-current Wed Jan 27 22:56:13 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA25010 for freebsd-current-outgoing; Wed, 27 Jan 1999 22:56:13 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA25003 for ; Wed, 27 Jan 1999 22:56:12 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id WAA29273; Wed, 27 Jan 1999 22:55:41 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma029266; Wed, 27 Jan 99 22:55:30 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id WAA24290; Wed, 27 Jan 1999 22:55:29 -0800 (PST) From: Archie Cobbs Message-Id: <199901280655.WAA24290@bubba.whistle.com> Subject: Re: kern/subr_scanf array index of signed char In-Reply-To: <199901280559.VAA93563@apollo.backplane.com> from Matthew Dillon at "Jan 27, 99 09:59:53 pm" To: dillon@apollo.backplane.com (Matthew Dillon) Date: Wed, 27 Jan 1999 22:55:29 -0800 (PST) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon writes: > :> Actually, it could very well be that I don't. I didn't want to spend > :> the time to check to see if the compiler warned on unsigned-char array > :> indexes. You can change it back if unsigned char array indexes do not > :> produce a warning. > : > :Sloppy thinking. How would you know if you fixed the bug unless you checked > :that you fixed the bug instead of breaking the warning? The bug was that > :on systems with signed chars, *inp gave negative array indexes if the > :caller passes a format string with negative characters in certain positions. > :There are still lots of related isfoo(*inp) bugs. All these bugs are more > :serious in the userland. > : > :Bruce > > Oh come on, give me some credit -- I knew I fixed the bug by casting > it to unsigned char. But after spending over 8 hours working the > files over so people compiling the kernel don't get overwhelmed > with warnings I was getting a bit fermented in the chair. I know how you feel Matt. After I did a bunch of -Wunused fixes (literally over a hundred files) the responses I got contained a couple of positive comments, one 'stop touching my code!', and one nit picky email long on criticism and short on constructivity. Damn the torpedoes, full steam ahead! :-) Actually I think most people are just very 'interested' .. and justifiably so .. it just comes across the wrong way sometimes. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message