From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrB2H-00056i-G9 for qemu-devel@nongnu.org; Mon, 24 Jun 2013 13:58:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrB2F-0005vp-OR for qemu-devel@nongnu.org; Mon, 24 Jun 2013 13:58:41 -0400 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=43447 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrB2F-0005uu-In for qemu-devel@nongnu.org; Mon, 24 Jun 2013 13:58:39 -0400 Message-ID: <51C888CA.50603@weilnetz.de> Date: Mon, 24 Jun 2013 19:58:34 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1370599329-16682-1-git-send-email-xiawenc@linux.vnet.ibm.com> <87ehcedsi7.fsf@blackfin.pond.sub.org> <51C032D2.80405@redhat.com> <51C5766F.8000704@weilnetz.de> <51C85B5D.7050702@redhat.com> In-Reply-To: <51C85B5D.7050702@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2] build: remove compile warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Alexander Graf , qemu-devel@nongnu.org Am 24.06.2013 16:44, schrieb Paolo Bonzini: > Il 22/06/2013 12:03, Stefan Weil ha scritto: >> I get this warning, too, when I run a normal cross compilation with >> MinGW-w64: >> >> util/iov.c:190:33: warning: =E2=80=98orig_len=E2=80=99 may be used uni= nitialized in this >> function [-Wuninitialized] >> >> My build environment: >> >> Debian wheezy with packages gcc-mingw-w64-i686, gcc-mingw-w64-x86-64 >> (4.6.3-14+8). >> >> A complete build results in 5 warnings. Here are the other 4 of them: >> >> hw/arm/spitz.c:280:0: warning: "MOD_SHIFT" redefined [enabled by defau= lt] >> hw/ppc/spapr.c:673:26: warning: cast from pointer to integer of >> different size [-Wpointer-to-int-cast] > Isn't this one a Win64 bug? Yes. http://patchwork.ozlabs.org/patch/252666/ fixes it. >> hw/ppc/spapr_hcall.c:188:1: warning: control reaches end of non-void >> function [-Wreturn-type] >> hw/ppc/spapr_pci.c:454:1: warning: control reaches end of non-void >> function [-Wreturn-type] > I think you could report this to mingw. GCC should handle "if (!0) > foo()" just fine if foo is noreturn, perhaps the "assertion failure" > runtime function is not noreturn in mingw. It's a gcc problem. Removing the assertion manually in the source code and compiling with NDEBUG (which we do by default)results in the same compiler warning. I have sent a small patch series which fixes both warnings and which hopefully matches your criteria for acceptable code changes :-) See http://patchwork.ozlabs.org/patch/253937/ and two more. Regards Stefan