+2012-08-06 Robert Dewar <dewar@adacore.com>
+
+ * s-htable.adb: Minor reformatting.
+
+2012-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * s-oscons-tmplt.c, g-socket.adb (System.OS_Constants.Target_OS):
+ Suppress warnings so that we don't have to do it at each usage.
+
2012-08-06 Vincent Pucci <pucci@adacore.com>
* exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body):
-- no check required. Warnings suppressed because condition
-- is known at compile time.
- pragma Warnings (Off);
if Target_OS = Windows then
- pragma Warnings (On);
return;
-- struct timeval, but on Windows it is a milliseconds count in
-- a DWORD.
- pragma Warnings (Off);
if Target_OS = Windows then
- pragma Warnings (On);
-
Len := V4'Size / 8;
Add := V4'Address;
when Send_Timeout |
Receive_Timeout =>
- pragma Warnings (Off);
if Target_OS = Windows then
- pragma Warnings (On);
-- Timeout is in milliseconds, actual value is 500 ms +
-- returned value (unless it is 0).
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset)
is
- pragma Warnings (Off, Stream);
-
First : Ada.Streams.Stream_Element_Offset := Item'First;
Index : Ada.Streams.Stream_Element_Offset := First - 1;
Max : constant Ada.Streams.Stream_Element_Offset := Item'Last;
when Send_Timeout |
Receive_Timeout =>
- pragma Warnings (Off);
if Target_OS = Windows then
- pragma Warnings (On);
-- On Windows, the timeout is a DWORD in milliseconds, and
-- the actual timeout is 500 ms + the given value (unless it
use type C.unsigned_short;
begin
- -- Big-endian case. No conversion needed. On these platforms,
- -- htons() defaults to a null procedure.
-
- pragma Warnings (Off);
- -- Since the test can generate "always True/False" warning
+ -- Big-endian case. No conversion needed. On these platforms, htons()
+ -- defaults to a null procedure.
if Default_Bit_Order = High_Order_First then
return S;
- pragma Warnings (On);
-
-- Little-endian case. We must swap the high and low bytes of this
-- short to make the port number network compliant.
-- --
-- B o d y --
-- --
--- Copyright (C) 1995-2011, AdaCore --
+-- Copyright (C) 1995-2012, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
begin
Elmt := Table (Hash (K));
-
loop
if Elmt = Null_Ptr then
return Null_Ptr;
begin
if not Iterator_Started then
return Null_Ptr;
+ else
+ Iterator_Ptr := Next (Iterator_Ptr);
+ return Get_Non_Null;
end if;
-
- Iterator_Ptr := Next (Iterator_Ptr);
- return Get_Non_Null;
end Get_Next;
------------------
procedure Set (E : Elmt_Ptr) is
Index : Header_Num;
-
begin
Index := Hash (Get_Key (E));
Set_Next (E, Table (Index));
# define TARGET_OS "Other_OS"
#endif
C("Target_OS", OS_Type, TARGET_OS, "")
+/*
+ pragma Warnings (Off, Target_OS);
+ -- Suppress warnings on Target_OS since it is in general tested for
+ -- equality with a constant valueto implement conditional compilation,
+ -- which normally generates a constant condition warning.
+
+*/
#define Target_Name TARGET
CST(Target_Name, "")
/*