From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQI9Y-0001ug-4q for qemu-devel@nongnu.org; Thu, 21 Jul 2016 13:53:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQI9W-0002HU-6k for qemu-devel@nongnu.org; Thu, 21 Jul 2016 13:52:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQI9W-0002HK-0q for qemu-devel@nongnu.org; Thu, 21 Jul 2016 13:52:54 -0400 Date: Thu, 21 Jul 2016 20:52:45 +0300 From: "Michael S. Tsirkin" Message-ID: <1469123413-20809-23-git-send-email-mst@redhat.com> References: <1469123413-20809-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1469123413-20809-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL v5 22/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 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 2e57396..ccfcc69 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -2024,7 +2024,7 @@ static int vtd_irte_get(IntelIOMMUState *iommu, uint16_t index, /* Fetch IRQ information of specific IR index */ static int vtd_remap_irq_get(IntelIOMMUState *iommu, uint16_t index, VTDIrq *irq) { - VTD_IRTE irte = { 0 }; + VTD_IRTE irte = {}; int ret = 0; ret = vtd_irte_get(iommu, index, &irte); @@ -2082,7 +2082,7 @@ static int vtd_interrupt_remap_msi(IntelIOMMUState *iommu, int ret = 0; VTD_IR_MSIAddress addr; uint16_t index; - VTDIrq irq = {0}; + VTDIrq irq = {}; assert(origin && translated); @@ -2176,7 +2176,7 @@ static MemTxResult vtd_mem_ir_write(void *opaque, hwaddr addr, MemTxAttrs attrs) { int ret = 0; - MSIMessage from = {0}, to = {0}; + MSIMessage from = {}, to = {}; from.address = (uint64_t) addr + VTD_INTERRUPT_ADDR_FIRST; from.data = (uint32_t) value; -- MST