From: Steve Baird Date: Mon, 29 Aug 2022 22:33:45 +0000 (-0700) Subject: [Ada] Initialize a local variable to avoid a CodePeer warning X-Git-Tag: basepoints/gcc-14~4611 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fcd4ccd445bd86f417db0d6940a679ced2e6307;p=thirdparty%2Fgcc.git [Ada] Initialize a local variable to avoid a CodePeer warning gcc/ada/ * sem_ch4.adb (Analyze_Selected_Component): Initialize the local variable Comp to avoid having CodePeer generate an uninitialized variable warning. --- diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 6c817326ee3e..ceaf66bd3e2a 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -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;