diff options
author | Arnaud Charlet <charlet@adacore.com> | 2019-12-12 14:01:03 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-02 04:58:05 -0400 |
commit | a6b13d324fa2d83538e2c733906ced7b000209ac (patch) | |
tree | da57150775778fc8e4b3770d2b80fd68e49c4c66 /gcc/ada/xoscons.adb | |
parent | 5c726f3e42e227fdca32289e99b815988c40481a (diff) | |
download | gcc-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/xoscons.adb')
-rw-r--r-- | gcc/ada/xoscons.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/xoscons.adb b/gcc/ada/xoscons.adb index 7c72e4e..68784f2 100644 --- a/gcc/ada/xoscons.adb +++ b/gcc/ada/xoscons.adb @@ -494,6 +494,9 @@ procedure XOSCons is Value1 := Get_Value (Slice (Sline, 2)); Value2 := Get_Value (Slice (Sline, 4)); + pragma Annotate (CodePeer, Modified, Value1); + pragma Annotate (CodePeer, Modified, Value2); + if Slice (Sline, 3) = ">" then Res := Cond and (Value1 > Value2); @@ -619,7 +622,7 @@ procedure XOSCons is Current_Line : Integer; Current_Info : Integer; In_Comment : Boolean; - In_Template : Boolean; + In_Template : Boolean := False; -- Start of processing for XOSCons |