public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Remove unused initial value in Read_Library_Info_From_Full
@ 2021-05-06  7:58 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-05-06  7:58 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

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

Remove an initial value of a local variable that were never used. Static
analysis tools like CodePeer should easily recognize that this variable
is only accessed after being written.

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

gcc/ada/

	* osint.adb (Read_Library_Info_From_Full): Cleanup unused
	initial value.

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

diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.adb
@@ -2564,7 +2564,7 @@ package body Osint is
       --  Read data from the file
 
       declare
-         Actual_Len : Integer := 0;
+         Actual_Len : Integer;
 
          Lo : constant Text_Ptr := 0;
          --  Low bound for allocated text buffer



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

only message in thread, other threads:[~2021-05-06  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06  7:58 [Ada] Remove unused initial value in Read_Library_Info_From_Full 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).