From: Viljar Indus Date: Tue, 22 Jul 2025 07:17:59 +0000 (+0300) Subject: ada: Fix code quality issue in table.adb X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a550f2309cdb776dce9876c52a433ff77737e8fd;p=thirdparty%2Fgcc.git ada: Fix code quality issue in table.adb gcc/ada/ChangeLog: * table.adb (Max): Move variable to the body and initialize it with the same value as in the Init function. * table.ads (Max): Likewise. --- diff --git a/gcc/ada/table.adb b/gcc/ada/table.adb index 37c49494197..31891de87db 100644 --- a/gcc/ada/table.adb +++ b/gcc/ada/table.adb @@ -40,6 +40,9 @@ package body Table is Min : constant Int := Int (Table_Low_Bound); -- Subscript of the minimum entry in the currently allocated table + Max : Int := Min + (Table_Initial * Table_Factor) - 1; + -- Subscript of the maximum entry in the currently allocated table + Length : Int := 0; -- Number of entries in currently allocated table. The value of zero -- ensures that we initially allocate the table. diff --git a/gcc/ada/table.ads b/gcc/ada/table.ads index 22e9172bc48..623ce14711b 100644 --- a/gcc/ada/table.ads +++ b/gcc/ada/table.ads @@ -223,9 +223,6 @@ package Table is -- the official interfaces (since a modification to Last may require a -- reallocation of the table). - Max : Int; - -- Subscript of the maximum entry in the currently allocated table - type Saved_Table is record Last_Val : Int; Max : Int;