Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kurqe-0005ke-SE for qemu-devel@nongnu.org; Tue, 28 Oct 2008 12:55:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kurqc-0005kP-MD for qemu-devel@nongnu.org; Tue, 28 Oct 2008 12:55:15 -0400 Received: from [199.232.76.173] (port=36475 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kurqc-0005kL-HA for qemu-devel@nongnu.org; Tue, 28 Oct 2008 12:55:14 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:14885) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kurqc-0001uk-A1 for qemu-devel@nongnu.org; Tue, 28 Oct 2008 12:55:14 -0400 Received: from mariner.uk.xensource.com ([10.80.2.22]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id m9SGt1qQ017100 for ; Tue, 28 Oct 2008 09:55:02 -0700 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.63) (envelope-from ) id 1KurqK-0005tQ-Ap for qemu-devel@nongnu.org; Tue, 28 Oct 2008 16:54:56 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18695.17376.329419.634634@mariner.uk.xensource.com> Date: Tue, 28 Oct 2008 16:54:56 +0000 Subject: Re: [Qemu-devel] [5275] Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings In-Reply-To: References: From: Ian Jackson Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Blue Swirl writes ("[Qemu-devel] [5275] Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings"): > - ret = sprintf(phys_ram_base + (16 << 20) - 256, > + ret = sprintf((char *)(phys_ram_base + (16 << 20) - 256), I realise I'm a bit late with this comment (my apologies), but: I think this shows that it would be better to suppress the warning with the appropriate compiler option, than to try to update the code. IMO the warning is a mistake since representational compatibility between corresponding signed and unsigned types is certain for any platform qemu could plausibily support. And these kind of casts are dangerous because they can suppress serious warnings about pointer/integer mismatch. Ian.