This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Remove valgrind uninitialized-read warnings in lib-xref.adb


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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]