From 583acc4d8e570e738516463cc1c6afcce22ee13d Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Wed, 22 Feb 2023 17:25:33 +0100 Subject: ada: Add default value at initialization for CodePeer Avoid spurious alarm by CodePeer analysis by adding default value for a variable initialization. gcc/ada/ * sem_util.adb (Check_Node): Add default init on local Id. --- gcc/ada/sem_util.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index c8599d4..baf4cef 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -2618,7 +2618,8 @@ package body Sem_Util is function Check_Node (N : Node_Id) return Traverse_Result is Is_Writable_Actual : Boolean := False; - Id : Entity_Id; + Id : Entity_Id := Empty; + -- Default init of Id for CodePeer begin if Nkind (N) = N_Identifier then -- cgit v1.1