]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Suppress warning in g-sthcso for non-unix platforms
authorJohannes Kliemann <kliemann@adacore.com>
Fri, 28 Jan 2022 14:54:21 +0000 (14:54 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 11 May 2022 08:53:18 +0000 (08:53 +0000)
gcc/ada/

* libgnat/g-sthcso.adb: Suppress warning about unneeded use type
clause.

gcc/ada/libgnat/g-sthcso.adb

index f045c02b99eb3943378d3f73eead967d00f4dc96..fd99eebbdb78be6ef2d90e4f2759c55d16342b0c 100644 (file)
@@ -41,7 +41,12 @@ function C_Socketpair
    Protocol : C.int;
    Fds      : not null access Fd_Pair) return C.int
 is
+   --  This use type clause is not required on all platforms
+   --  using this implementation. So we suppress the warning
+   --  for the platforms that already use this type.
+   pragma Warnings (Off, "use clause for type *");
    use type C.char_array;
+   pragma Warnings (On, "use clause for type *");
 
    L_Sock, C_Sock, P_Sock : C.int := Failure;
    --  Listening socket, client socket and peer socket