Skip to content

Commit

Permalink
Suppress warnings about set but not used arguments in example apps
Browse files Browse the repository at this point in the history
  • Loading branch information
treiher committed Mar 23, 2021
1 parent 31dba9d commit ae38256
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/apps/ping/src/icmpv4.adb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ is
end Process_Data;
procedure Set_Data is new RFLX.ICMP.Message.Generic_Set_Data (Process_Data, Valid_Length);
begin
-- WORKAROUND: Componolit/Workarounds#32
pragma Warnings (Off, "unused assignment to ""*_Context""");
pragma Warnings (Off, """*_Context"" is set by ""*"" but not used after the call");
RFLX.IPv4.Packet.Initialize (IP_Context, Buf);
RFLX.IPv4.Packet.Set_Version (IP_Context, 4);
RFLX.IPv4.Packet.Set_IHL (IP_Context, 5);
Expand Down Expand Up @@ -224,6 +226,7 @@ is
RFLX.IPv4.Packet.Take_Buffer (IP_Context, Buf);
end if;
Last := RFLX.RFLX_Types.Byte_Index (RFLX.IPv4.Packet.Message_Last (IP_Context));
pragma Warnings (On, """*_Context"" is set by ""*"" but not used after the call");
pragma Warnings (On, "unused assignment to ""*_Context""");
end Generate;

Expand All @@ -240,7 +243,9 @@ is
Source : RFLX.IPv4.Address;
Seq : RFLX.ICMP.Sequence_Number;
begin
-- WORKAROUND: Componolit/Workarounds#32
pragma Warnings (Off, "unused assignment to ""*_Context""");
pragma Warnings (Off, """*_Context"" is set by ""*"" but not used after the call");
RFLX.IPv4.Packet.Initialize (IP_Context, Buf);
RFLX.IPv4.Packet.Verify_Message (IP_Context);
if
Expand All @@ -264,6 +269,7 @@ is
Seq := RFLX.ICMP.Message.Get_Sequence_Number (ICMP_Context);
RFLX.ICMP.Message.Take_Buffer (ICMP_Context, Buf);
Ada.Text_IO.Put_Line (Image (Length) & " bytes from " & Image (Source) & ": icmp_seq=" & Image (Seq));
pragma Warnings (On, """*_Context"" is set by ""*"" but not used after the call");
pragma Warnings (On, "unused assignment to ""*_Context""");
end Print;

Expand Down

0 comments on commit ae38256

Please sign in to comment.