[Ada] Fix CodePeer warnings
gcc/ada/ * atree.adb (Print_Statistics): Help CodePeer see Total as greater than zero. * gen_il-gen.adb (One_Comp): Annotate Field_Table as Modified.
This commit is contained in:
parent
ddd1ab30e6
commit
3323aa7ee7
2 changed files with 5 additions and 0 deletions
|
@ -2503,6 +2503,10 @@ package body Atree is
|
|||
Total := G_Total + S_Total;
|
||||
end loop;
|
||||
|
||||
-- This assertion helps CodePeer understand that Total cannot be 0 (this
|
||||
-- is true because GNAT does not attempt to compile empty files).
|
||||
pragma Assert (Total > 0);
|
||||
|
||||
Write_Int_64 (Total);
|
||||
Write_Str (" (100%) = ");
|
||||
Write_Int_64 (G_Total);
|
||||
|
|
|
@ -2347,6 +2347,7 @@ package body Gen_IL.Gen is
|
|||
procedure One_Comp (F : Field_Enum);
|
||||
|
||||
procedure One_Comp (F : Field_Enum) is
|
||||
pragma Annotate (Codepeer, Modified, Field_Table);
|
||||
Offset : constant Field_Offset := Field_Table (F).Offset;
|
||||
begin
|
||||
if First_Time then
|
||||
|
|
Loading…
Add table
Reference in a new issue