]> granicus.if.org Git - graphviz/commitdiff
sfio: squash -Wunused-variable on platforms without SIGPIPE
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 20 Nov 2021 06:17:29 +0000 (22:17 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 24 Nov 2021 15:47:40 +0000 (07:47 -0800)
This warning, for example, is triggered in Mingw builds.

lib/sfio/sfmode.c

index 51bc85383242e2644c3ebc3a0c0cd89a2502e30b..2ded6d3d7560709e93d5170a6f6151baf2e09989 100644 (file)
@@ -37,7 +37,9 @@
 /* the below is for protecting the application from SIGPIPE */
 #include               <signal.h>
 typedef void (*Sfsignal_f) (int);
+#ifdef SIGPIPE
 static int _Sfsigp = 0;                /* # of streams needing SIGPIPE protection */
+#endif
 
 /* done at exiting time */
 static void _sfcleanup(void)