]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix violations of GNAT-specific GNATcheck rules
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 19 Dec 2024 23:07:23 +0000 (00:07 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 7 Jan 2025 12:33:34 +0000 (13:33 +0100)
Code cleanup; semantics is unaffected.

gcc/ada/ChangeLog:

* diagnostics-pretty_emitter.adb (Get_Last_Line_Char): Fix whitespace.
* sem_aggr.adb (Resolve_Array_Aggregate): Fix style.

gcc/ada/diagnostics-pretty_emitter.adb
gcc/ada/sem_aggr.adb

index e376ae12803869808f4a649a64ca18b3d01d41de..c624f40016967dc8bac8ec5beede06c39569b1c9 100644 (file)
@@ -327,7 +327,6 @@ package body Diagnostics.Pretty_Emitter is
    is
       Cur_Loc : Source_Ptr := Get_Line_End (Buf, Loc);
    begin
-
       while Cur_Loc > Buf'First
         and then Buf (Cur_Loc) in ASCII.LF | ASCII.CR
       loop
index 5bef9e224846b71384948ec1655dc2efa08ae958..562240ca4ef65c6c656454eeaaf9a1cd84192502 100644 (file)
@@ -2968,8 +2968,8 @@ package body Sem_Aggr is
                               Scope_Parent : Node_Id;
                            begin
                               if Nkind (Exp) /= N_Identifier
-                                or else not Present (Entity (Exp))
-                                or else not Present (Scope (Entity (Exp)))
+                                or else No (Entity (Exp))
+                                or else No (Scope (Entity (Exp)))
                                 or else Ekind (Scope (Entity (Exp))) /= E_Loop
                               then
                                  return OK;