Received: from eggs.gnu.org ([2001:4830:134:3::10]:58890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzTb3-00005P-6b for qemu-devel@nongnu.org; Tue, 24 Jun 2014 12:29:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzTav-0006YP-R2 for qemu-devel@nongnu.org; Tue, 24 Jun 2014 12:29:25 -0400 From: Michael Tokarev Date: Tue, 24 Jun 2014 20:09:10 +0400 Message-Id: <1403626160-15546-5-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1403626160-15546-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1403626160-15546-1-git-send-email-mjt@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 04/14] target-ppc: Fix compiler warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Stefan Weil , Michael Tokarev From: Stefan Weil gcc reports a warning which is usually wrong: target-ppc/dfp_helper.c: In function =E2=80=98dfp_get_digit=E2=80=99: target-ppc/dfp_helper.c:417:1: warning: control reaches end of non-void function [-Wreturn-type] The compiler shows the warning if assert is not marked with the noreturn attribute or if the code is compiled with -DNDEBUG. Using g_assert_not_reached better documents the intention and does not have these problems. Signed-off-by: Stefan Weil Reviewed-by: Alexander Graf Signed-off-by: Michael Tokarev --- target-ppc/dfp_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-ppc/dfp_helper.c b/target-ppc/dfp_helper.c index 773803a..49820bf 100644 --- a/target-ppc/dfp_helper.c +++ b/target-ppc/dfp_helper.c @@ -411,9 +411,8 @@ static inline int dfp_get_digit(decNumber *dn, int n) return (dn->lsu[unit] / 10) % 10; case 2: return dn->lsu[unit] / 100; - default: - assert(0); } + g_assert_not_reached(); } =20 #define DFP_HELPER_TAB(op, dnop, postprocs, size) = \ --=20 1.7.10.4