[Ada] Initialize variable to Empty

Message ID 20211025150910.GA346525@adacore.com
State Committed
Commit c9d2cc2ac82593bd6a8eceb08d3cbf17ab1bea2c
Headers
Series [Ada] Initialize variable to Empty |

Commit Message

Pierre-Marie de Rodat Oct. 25, 2021, 3:09 p.m. UTC
  CodePeer was warning about this variable being potentially used without
being initialized.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_ch8.adb (Analyze_Subprogram_Renaming): Set New_S to Empty.
  

Patch

diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -3099,7 +3099,7 @@  package body Sem_Ch8 is
       --  related formal type is class-wide.
 
       Inst_Node    : Node_Id   := Empty;
-      New_S        : Entity_Id;
+      New_S        : Entity_Id := Empty;
       Wrapped_Prim : Entity_Id := Empty;
 
    --  Start of processing for Analyze_Subprogram_Renaming