diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-26 23:59:03 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-27 23:30:01 -0400 |
commit | ff68b4b5b158883ba8954db2876cd026c47b8443 (patch) | |
tree | ce54d1e4360b5cb69b61033475ef1e57bd9e15fb /sim/frv/frv.c | |
parent | 9df51d7c470b6193627790a421e90209e9a00c10 (diff) | |
download | binutils-gdb-ff68b4b5b158883ba8954db2876cd026c47b8443.tar.gz |
sim: frv: fix ambiguous else compiler warnings
Add explicit braces to if bodies when the body is another if/else
to fix a bunch of compiler warnings.
Diffstat (limited to 'sim/frv/frv.c')
-rw-r--r-- | sim/frv/frv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sim/frv/frv.c b/sim/frv/frv.c index aff9dc1a49e..22c5fb7d8bd 100644 --- a/sim/frv/frv.c +++ b/sim/frv/frv.c @@ -1182,10 +1182,12 @@ frvbf_shift_left_arith_saturate (SIM_CPU *current_cpu, SI arg1, SI arg2) /* Signed shift by 31 or greater saturates by definition. */ if (arg2 >= 31) - if (arg1 > 0) - return (SI) 0x7fffffff; - else - return (SI) 0x80000000; + { + if (arg1 > 0) + return (SI) 0x7fffffff; + else + return (SI) 0x80000000; + } /* OK, arg2 is between 1 and 31. */ neg_arg1 = (arg1 < 0); |