aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/uintp.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2019-12-12 14:01:03 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-02 04:58:05 -0400
commita6b13d324fa2d83538e2c733906ced7b000209ac (patch)
treeda57150775778fc8e4b3770d2b80fd68e49c4c66 /gcc/ada/uintp.adb
parent5c726f3e42e227fdca32289e99b815988c40481a (diff)
downloadgcc-a6b13d324fa2d83538e2c733906ced7b000209ac.zip
gcc-a6b13d324fa2d83538e2c733906ced7b000209ac.tar.gz
gcc-a6b13d324fa2d83538e2c733906ced7b000209ac.tar.bz2
[Ada] Address potentially uninitialized variables and dead code
2020-06-02 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * bcheck.adb, binde.adb, bindo-diagnostics.adb, checks.adb, exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch9.adb, gnatname.adb, sem_case.adb, sem_ch13.adb, sem_ch5.adb, sem_prag.adb, sem_util.adb, uintp.adb, urealp.adb, xoscons.adb, xr_tabls.adb, xref_lib.adb: Initialize objects more explicitly and add corresponding assertions. Remove dead code. Also add a few Annotate pragmas to help static analysis. * libgnat/a-caldel.adb, libgnat/a-calend.adb, libgnat/a-ngcoty.adb, libgnat/a-ngelfu.adb, libgnat/a-ngrear.adb, libgnat/a-strfix.adb, libgnat/g-calend.adb, libgnat/g-catiio.adb, libgnat/g-comlin.adb, libgnat/g-debpoo.adb, libgnat/g-dirope.adb, libgnat/g-hesorg.adb, libgnat/g-pehage.adb, libgnat/g-socket.adb, libgnat/i-cobol.adb, libgnat/s-dwalin.adb, libgnat/s-dwalin.ads, libgnat/s-fatgen.adb, libgnat/s-gearop.adb, libgnat/s-genbig.adb, libgnat/s-imgrea.adb, libgnat/s-os_lib.adb, libgnat/s-rannum.adb, libgnat/s-regpat.adb, libgnat/s-trasym__dwarf.adb, libgnat/s-valrea.adb: Ditto.
Diffstat (limited to 'gcc/ada/uintp.adb')
-rw-r--r--gcc/ada/uintp.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb
index 61e9f3d..bfdcb29 100644
--- a/gcc/ada/uintp.adb
+++ b/gcc/ada/uintp.adb
@@ -1294,6 +1294,7 @@ package body Uintp is
Discard_Int : Int;
pragma Warnings (Off, Discard_Int);
begin
+ pragma Assert (D /= Int'(0));
UI_Div_Vector
(Dividend (Dividend'Last - R_Length + 1 .. Dividend'Last),
D,