This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Remove valgrind uninitialized-read warnings in lib-xref.adb
- From: oliver dot kellogg at t-online dot de (Oliver Kellogg)
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 17 Aug 2009 21:11:13 +0200
- Subject: [Ada] Remove valgrind uninitialized-read warnings in lib-xref.adb
- Reply-to: okellogg at users dot sourceforge dot net
Bootstrapped and tested on i686-pc-linux-gnu.
2009-07-17 Oliver Kellogg <okellogg@users.sourceforge.net>
* ada/lib-xref.adb (Generate_Reference,
Output_References.Handle_Orphan_Type_References.New_Entry):
Add missing initializations reported by valgrind.
Index: ada/lib-xref.adb
===================================================================
--- ada/lib-xref.adb (revision 150855)
+++ ada/lib-xref.adb (working copy)
@@ -841,6 +841,7 @@
Indx := Xrefs.Last;
Xrefs.Table (Indx).Loc := Ref;
+ Xrefs.Table (Indx).Def := Def;
-- Overriding operations are marked with 'P'
@@ -1232,7 +1233,9 @@
Indx := Xrefs.Last;
Loc := Original_Location (Sloc (E));
Xrefs.Table (Indx).Ent := E;
+ Xrefs.Table (Indx).Def := No_Location;
Xrefs.Table (Indx).Loc := No_Location;
+ Xrefs.Table (Indx).Typ := ' ';
Xrefs.Table (Indx).Eun := Get_Source_Unit (Loc);
Xrefs.Table (Indx).Lun := No_Unit;
Set_Has_Xref_Entry (E);