]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Initialize a local variable to avoid a CodePeer warning
authorSteve Baird <baird@adacore.com>
Mon, 29 Aug 2022 22:33:45 +0000 (15:33 -0700)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 12 Sep 2022 08:16:50 +0000 (10:16 +0200)
gcc/ada/

* sem_ch4.adb
(Analyze_Selected_Component): Initialize the local variable Comp
to avoid having CodePeer generate an uninitialized variable
warning.

gcc/ada/sem_ch4.adb

index 6c817326ee3ec7d75c1d00d699bd476e0ffd99fe..ceaf66bd3e2a434e90f4386fe82e1bb4c2477bf5 100644 (file)
@@ -4798,7 +4798,7 @@ package body Sem_Ch4 is
       Name          : constant Node_Id := Prefix (N);
       Sel           : constant Node_Id := Selector_Name (N);
       Act_Decl      : Node_Id;
-      Comp          : Entity_Id;
+      Comp          : Entity_Id := Empty;
       Has_Candidate : Boolean := False;
       Hidden_Comp   : Entity_Id;
       In_Scope      : Boolean;