From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOiCz-0004Ru-Co for qemu-devel@nongnu.org; Thu, 28 Jan 2016 03:45:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOiCw-0000ZS-20 for qemu-devel@nongnu.org; Thu, 28 Jan 2016 03:45:41 -0500 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:34736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOiCv-0000Z8-SH for qemu-devel@nongnu.org; Thu, 28 Jan 2016 03:45:37 -0500 Received: by mail-wm0-x235.google.com with SMTP id 128so324292wmz.1 for ; Thu, 28 Jan 2016 00:45:36 -0800 (PST) Sender: Paolo Bonzini References: <20160127182352.GA5526@aepfle.de> From: Paolo Bonzini Message-ID: <56A9D525.7060607@redhat.com> Date: Thu, 28 Jan 2016 09:45:25 +0100 MIME-Version: 1.0 In-Reply-To: <20160127182352.GA5526@aepfle.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] qemu-upstream compile failure in intel_iommu.c:vtd_context_device_invalidate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Olaf Hering , Stefano Stabellini Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org On 27/01/2016 19:23, Olaf Hering wrote: > > xen.git/tools/qemu-xen-dir/hw/i386/intel_iommu.c: In function ‘vtd_context_device_invalidate’: > xen.git/tools/qemu-xen-dir/hw/i386/intel_iommu.c:911:46: error: ‘mask’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > if (vtd_as && ((devfn_it & mask) == (devfn & mask))) { > ^ > It works with -O2. From the code flow its clear that mask is always > initialized. Looks like gcc 5.2.1 does no proper diagnostic at -O1. > What should be done with such issues, are they fixed in the code? It's probably simplest to add a default: abort(); to the switch statement above. Paolo