Skip to content

Commit

Permalink
Add a pragma warnings off around constant condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
gingold-adacore committed Jan 6, 2016
1 parent 36a3b1d commit f8a238b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ortho/mcode/binary_file.adb
Original file line number Diff line number Diff line change
Expand Up @@ -761,13 +761,15 @@ package body Binary_File is

procedure Gen_Addr (Offset : Integer_32) is
begin
pragma Warnings (Off); -- Avoid warning on constant condition.
if Pc_Type'Size = 32 then
Gen_32 (Conv (Offset));
elsif Pc_Type'Size = 64 then
Gen_64 (Unsigned_64 (Conv (Offset)));
else
raise Program_Error;
end if;
pragma Warnings (On);
end Gen_Addr;

procedure Gen_Abs (Sym : Symbol; Offset : Integer_32) is
Expand Down

0 comments on commit f8a238b

Please sign in to comment.