summaryrefslogtreecommitdiff
path: root/target-ppc/dfp_helper.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2014-06-17 19:18:28 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2014-06-24 20:01:24 +0400
commit0211b5cf2d933e10b5916b203fc3fad805a9a3c0 (patch)
treef1489e1f0ed3121bf0e95180e803938733f711bc /target-ppc/dfp_helper.c
parente91c793cb50b83a695bbbf677ebfff478d8c62f2 (diff)
target-ppc: Fix compiler warning
gcc reports a warning which is usually wrong: target-ppc/dfp_helper.c: In function ‘dfp_get_digit’: 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 <sw@weilnetz.de> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'target-ppc/dfp_helper.c')
-rw-r--r--target-ppc/dfp_helper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target-ppc/dfp_helper.c b/target-ppc/dfp_helper.c
index 773803a285..49820bf21d 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();
}
#define DFP_HELPER_TAB(op, dnop, postprocs, size) \