* [Ada] Initialize variable to Empty
@ 2021-10-25 15:09 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-25 15:09 UTC (permalink / raw)
To: gcc-patches; +Cc: Ghjuvan Lacambre
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
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.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 424 bytes --]
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-25 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 15:09 [Ada] Initialize variable to Empty Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).