public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Remove unused initial values in expansion of distributed calls
@ 2021-05-03  9:29 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-05-03  9:29 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

Default initialization of a local Fname variable was never used. Code
cleanup only; semantics is unaffected.

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

gcc/ada/

	* exp_dist.adb (Build_From_Any_Call): Remove initial value for
	Fnam; fix style.
	(Build_To_Any_Call): Remove initial value for Fnam.
	(Build_TypeCode_Call): Likewise.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 1394 bytes --]

diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -8444,9 +8444,9 @@ package body Exp_Dist is
          is
             Loc : constant Source_Ptr := Sloc (N);
 
-            U_Type : Entity_Id  := Underlying_Type (Typ);
+            U_Type : Entity_Id := Underlying_Type (Typ);
 
-            Fnam    : Entity_Id := Empty;
+            Fnam    : Entity_Id;
             Lib_RE  : RE_Id := RE_Null;
             Result  : Node_Id;
 
@@ -8516,7 +8516,7 @@ package body Exp_Dist is
             --  Integer types
 
             elsif U_Type = RTE (RE_Integer_8) then
-                  Lib_RE := RE_FA_I8;
+               Lib_RE := RE_FA_I8;
 
             elsif U_Type = RTE (RE_Integer_16) then
                Lib_RE := RE_FA_I16;
@@ -9243,7 +9243,7 @@ package body Exp_Dist is
             Typ    : Entity_Id := Etype (N);
             U_Type : Entity_Id;
             C_Type : Entity_Id;
-            Fnam   : Entity_Id := Empty;
+            Fnam   : Entity_Id;
             Lib_RE : RE_Id := RE_Null;
 
          begin
@@ -10101,7 +10101,7 @@ package body Exp_Dist is
             --  The full view, if Typ is private; the completion,
             --  if Typ is incomplete.
 
-            Fnam   : Entity_Id := Empty;
+            Fnam   : Entity_Id;
             Lib_RE : RE_Id := RE_Null;
             Expr   : Node_Id;
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-03  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03  9:29 [Ada] Remove unused initial values in expansion of distributed calls 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).