diff mbox series

[COMMITTED,05/30] ada: Cleanup building of error messages for class-wide contracts

Message ID 20240610090747.1557638-5-poulhies@adacore.com
State New
Headers show
Series [COMMITTED,01/30] ada: Refactor checks for Refined_Global in generic instances | expand

Commit Message

Marc Poulhiès June 10, 2024, 9:07 a.m. UTC
From: Piotr Trojanek <trojanek@adacore.com>

Code cleanup; semantics is unaffected.

gcc/ada/

	* exp_ch6.adb (Build_Dynamic_Check_Helper_Call): Remove unused
	iteration over formal parameters.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_ch6.adb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index a8a70a5759d..e43389132ae 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -7635,7 +7635,6 @@  package body Exp_Ch6 is
                        Dynamic_Call_Helper (CW_Subp);
          Actuals   : constant List_Id := New_List;
          A         : Node_Id   := First_Actual (Call_Node);
-         F         : Entity_Id := First_Formal (Helper_Id);
 
       begin
          while Present (A) loop
@@ -7646,7 +7645,7 @@  package body Exp_Ch6 is
             Remove_Side_Effects (A);
 
             Append_To (Actuals, New_Copy_Tree (A));
-            Next_Formal (F);
+
             Next_Actual (A);
          end loop;