[Ada] Avoid false positive reported by CodePeer
authorJavier Miranda <miranda@adacore.com>
Sat, 6 Jun 2020 15:26:18 +0000 (11:26 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 16 Jul 2020 09:18:00 +0000 (05:18 -0400)
gcc/ada/

* exp_attr.adb (Expand_Access_To_Protected_Op): Initialize
variable Sub to Empty to avoid false positive reported by
Codepeer.

gcc/ada/exp_attr.adb

index 08c7118..cbc1fdd 100644 (file)
@@ -969,7 +969,7 @@ package body Exp_Attr is
       Loc     : constant Source_Ptr := Sloc (N);
       Agg     : Node_Id;
       Btyp    : constant Entity_Id := Base_Type (Typ);
-      Sub     : Entity_Id;
+      Sub     : Entity_Id          := Empty;
       Sub_Ref : Node_Id;
       E_T     : constant Entity_Id := Equivalent_Type (Btyp);
       Acc     : constant Entity_Id :=