[Ada] Fix "formal parameter & is not referenced" not being properly tagged
authorGhjuvan Lacambre <lacambre@adacore.com>
Wed, 4 May 2022 11:31:07 +0000 (13:31 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 1 Jun 2022 08:43:17 +0000 (08:43 +0000)
gcc/ada/

* sem_warn.adb (Warn_On_Unreferenced_Entity): Fix warning tag.

gcc/ada/sem_warn.adb

index 3dd8cd0..b23be72 100644 (file)
@@ -4414,9 +4414,10 @@ package body Sem_Warn is
 
                         if (No (S) or else not Is_Dispatching_Operation (S))
                           and then not Is_Trivial_Subprogram (Scope (E))
+                          and then Check_Unreferenced_Formals
                         then
                            Error_Msg_NE -- CODEFIX
-                             ("?u?formal parameter & is not referenced!",
+                             ("?f?formal parameter & is not referenced!",
                               E, Spec_E);
                         end if;
                      end;