From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeOmA-0001bt-7j for qemu-devel@nongnu.org; Sat, 13 Sep 2008 02:38:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeOm8-0001bh-O8 for qemu-devel@nongnu.org; Sat, 13 Sep 2008 02:38:33 -0400 Received: from [199.232.76.173] (port=39075 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeOm8-0001be-Hb for qemu-devel@nongnu.org; Sat, 13 Sep 2008 02:38:32 -0400 Received: from mx20.gnu.org ([199.232.41.8]:8281) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KeOm8-0002LH-0Z for qemu-devel@nongnu.org; Sat, 13 Sep 2008 02:38:32 -0400 Received: from wf-out-1314.google.com ([209.85.200.169]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KeOm7-0001E9-5o for qemu-devel@nongnu.org; Sat, 13 Sep 2008 02:38:31 -0400 Received: by wf-out-1314.google.com with SMTP id 27so1125791wfd.4 for ; Fri, 12 Sep 2008 23:38:29 -0700 (PDT) Message-ID: Date: Sat, 13 Sep 2008 09:38:29 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH][RFC] Fix gcc 4.x warnings (-Wpointer-sign) In-Reply-To: <20080912.145926.10073272.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080912.145926.10073272.imp@bsdimp.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "M. Warner Losh" Cc: qemu-devel@nongnu.org On 9/12/08, M. Warner Losh wrote: > In message: > "Blue Swirl" writes: > : GCC 4 enables -Wpointer-sign if -Wall is enabled. This trivial patch > > : suppresses the warnings. Comments? Objections? > > > Don't you mean 'fix' the warnings, since this patch looks like it > tries to cast things to be correct... Well, some parts of the patch actually fix the types so that they are more consistent, the casts just silence the warnings. A real fix would be to change the types but then it would be incorrect to change the signed types just to match the unsigned loadvm/savevm API. Now that I think of it, the API could be extended with signed versions. That would be best in terms of type safety. Maybe I'll try that approach instead.