Received: from eggs.gnu.org ([2001:4830:134:3::10]:47149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQGs1-00053c-Al for qemu-devel@nongnu.org; Thu, 21 Jul 2016 12:30:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQGrw-0000MY-9H for qemu-devel@nongnu.org; Thu, 21 Jul 2016 12:30:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQGrw-0000MR-02 for qemu-devel@nongnu.org; Thu, 21 Jul 2016 12:30:40 -0400 Date: Thu, 21 Jul 2016 19:30:34 +0300 From: "Michael S. Tsirkin" Message-ID: <1469118288-4776-57-git-send-email-mst@redhat.com> References: <1469118288-4776-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1469118288-4776-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL v4 56/57] intel_iommu: get rid of {0} initializers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini , Richard Henderson , Eduardo Habkost , peterx@redhat.com Correct and portable in theory, but triggers warnings with older gcc versions when -Wmissing-braces is enabled. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 Signed-off-by: Michael S. Tsirkin --- hw/i386/intel_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 9bfa520..42396d0 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -2089,7 +2089,7 @@ static int vtd_irte_get(IntelIOMMUState *iommu, uint16_t index, static int vtd_remap_irq_get(IntelIOMMUState *iommu, uint16_t index, VTDIrq *irq, uint16_t sid) { - VTD_IRTE irte = { 0 }; + VTD_IRTE irte = {}; int ret = 0; ret = vtd_irte_get(iommu, index, &irte, sid); @@ -2251,7 +2251,7 @@ static MemTxResult vtd_mem_ir_write(void *opaque, hwaddr addr, MemTxAttrs attrs) { int ret = 0; - MSIMessage from = {0}, to = {0}; + MSIMessage from = {}, to = {}; uint16_t sid = X86_IOMMU_SID_INVALID; from.address = (uint64_t) addr + VTD_INTERRUPT_ADDR_FIRST; -- MST