mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
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>
This commit is contained in:
parent
e91c793cb5
commit
0211b5cf2d
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user