public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Suppress warning in g-socthi__vxworks.adb
@ 2022-07-12 12:25 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-07-12 12:25 UTC (permalink / raw)
  To: gcc-patches; +Cc: Bob Duff

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

Follow-on to previous change, which missed the vxworks version of this
package.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnat/g-socthi__vxworks.adb (C_Connect): Suppress new warning.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 542 bytes --]

diff --git a/gcc/ada/libgnat/g-socthi__vxworks.adb b/gcc/ada/libgnat/g-socthi__vxworks.adb
--- a/gcc/ada/libgnat/g-socthi__vxworks.adb
+++ b/gcc/ada/libgnat/g-socthi__vxworks.adb
@@ -190,7 +190,9 @@ package body GNAT.Sockets.Thin is
          return Res;
       end if;
 
-      declare
+      pragma Warnings (Off, "unreachable code");
+      declare -- unreachable if Thread_Blocking_IO is statically True
+         pragma Warnings (On, "unreachable code");
          WSet : aliased Fd_Set;
          Now  : aliased Timeval;
       begin



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-12 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 12:25 [Ada] Suppress warning in g-socthi__vxworks.adb Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).