From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kza4U-0000mq-MQ for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:57:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kza4S-0000lw-Ve for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:57:02 -0500 Received: from [199.232.76.173] (port=47826 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kza4S-0000le-LJ for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:57:00 -0500 Received: from hs-out-0708.google.com ([64.233.178.246]:52850) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kza4S-0005hG-6C for qemu-devel@nongnu.org; Mon, 10 Nov 2008 11:57:00 -0500 Received: by hs-out-0708.google.com with SMTP id k27so1148512hsc.2 for ; Mon, 10 Nov 2008 08:56:59 -0800 (PST) Message-ID: Date: Mon, 10 Nov 2008 18:56:58 +0200 From: "Blue Swirl" In-Reply-To: <200811101735.34880.Christoph.Egger@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200811101055.17281.Christoph.Egger@amd.com> <200811101735.34880.Christoph.Egger@amd.com> Subject: [Qemu-devel] Re: [PATCH] fix warnings on NetBSD Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Egger Cc: qemu-devel@nongnu.org On 11/10/08, Christoph Egger wrote: > On Monday 10 November 2008 17:03:27 Blue Swirl wrote: > > On 11/10/08, Christoph Egger wrote: > > > Hi! > > > > > > Attached patch fixes a series of this warning > > > when compiling on NetBSD: > > > > > > warning: array subscript has type 'char' > > > > There has been some discussion on ctype.h macro problems, please see: > > http://lists.gnu.org/archive/html/qemu-devel/2008-08/msg01239.html > > > > I'd vote for introducing qemu_isfoobar and qemu_towombat instead of casts. > > > Attached patch introduces a CTYPE macro as mentioned on this mail. > The diff in qemu-common.h has been taken from xen ioemu. Sorry, you must have missed the two follow-up messages: http://lists.gnu.org/archive/html/qemu-devel/2008-08/msg01252.html http://lists.gnu.org/archive/html/qemu-devel/2008-08/msg01292.html So instead of CTYPE macro, there should be qemu_toupper, qemu_isalpha etc. which handle char arguments correctly even when sign extension happens.