From 02b8770a444bef9bb9a3dc23747e9b257f3af087 Mon Sep 17 00:00:00 2001 From: Johannes Kliemann Date: Fri, 28 Jan 2022 14:54:21 +0000 Subject: [PATCH] [Ada] Suppress warning in g-sthcso for non-unix platforms gcc/ada/ * libgnat/g-sthcso.adb: Suppress warning about unneeded use type clause. --- gcc/ada/libgnat/g-sthcso.adb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/ada/libgnat/g-sthcso.adb b/gcc/ada/libgnat/g-sthcso.adb index f045c02b99eb..fd99eebbdb78 100644 --- a/gcc/ada/libgnat/g-sthcso.adb +++ b/gcc/ada/libgnat/g-sthcso.adb @@ -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 -- 2.47.2