[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/22] spapr: Fix compiler warnings for some version
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 02/22] spapr: Fix compiler warnings for some versions of gcc |
Date: |
Thu, 11 Jul 2013 19:01:05 +0200 |
From: Stefan Weil <address@hidden>
i686-w64-mingw32-gcc (GCC) 4.6.3 from Debian wheezy reports these warnings:
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]
Both warnings are fixed by using g_assert_not_reached instead of assert.
A second line with assert(0) in spapr_pci.c which did not raise a compiler
warning was modified, too, because g_assert_not_reached documents the
purpose of that statement and is not removed in release builds.
Signed-off-by: Stefan Weil <address@hidden>
Acked-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/spapr_hcall.c | 2 +-
hw/ppc/spapr_pci.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index e6f321d..8bad27f 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -184,7 +184,7 @@ static target_ulong h_remove(PowerPCCPU *cpu,
sPAPREnvironment *spapr,
return H_HARDWARE;
}
- assert(0);
+ g_assert_not_reached();
}
#define H_BULK_REMOVE_TYPE 0xc000000000000000ULL
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 18f2e2f..318bc9d 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -451,7 +451,7 @@ static uint64_t spapr_io_read(void *opaque, hwaddr addr,
case 4:
return cpu_inl(addr);
}
- assert(0);
+ g_assert_not_reached();
}
static void spapr_io_write(void *opaque, hwaddr addr,
@@ -468,7 +468,7 @@ static void spapr_io_write(void *opaque, hwaddr addr,
cpu_outl(addr, data);
return;
}
- assert(0);
+ g_assert_not_reached();
}
static const MemoryRegionOps spapr_io_ops = {
--
1.8.1.4
- [Qemu-devel] [PULL 00/22] ppc patch queue 2013-07-11, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 04/22] spapr: Respect -bios command line option for SLOF, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 05/22] pseries: move interrupt controllers to hw/intc/, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 02/22] spapr: Fix compiler warnings for some versions of gcc,
Alexander Graf <=
- [Qemu-devel] [PATCH 09/22] PPC: Macio: Replace tabs with spaces, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 03/22] spapr: Use named enum for function remove_hpte, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 01/22] e600 core for MPC86xx processors, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 12/22] PPC: dbdma: Fix debug print, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 15/22] PPC: dbdma: Introduce kick function, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 22/22] PPC: dbdma: Support more multi-issue DMA requests, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 21/22] PPC: Add timer handler for newworld mac-io, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 17/22] PPC: dbdma: macio: Add DMA callback, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 11/22] PPC: Mac: Add debug prints in macio and dbdma code, Alexander Graf, 2013/07/11
- [Qemu-devel] [PATCH 18/22] PPC: dbdma: Move processing to io, Alexander Graf, 2013/07/11