[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning in spawn-pipe.c (create_pipe)

From: Bruno Haible
Subject: Re: Warning in spawn-pipe.c (create_pipe)
Date: Fri, 15 Dec 2017 00:28:00 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-101-generic; KDE/5.18.0; x86_64; ; )

Hi Tim,

> > Or through an in-file pragma that specifically documents that we are
> > intentionally ignoring the warning.
> I vote for this.

Does this patch eliminate the warning?

I couldn't reproduce the issue with clang 3.9.1 on Linux, therefore I have
to ask you to test it.


diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c
index cbcc4ee..3170a4f 100644
--- a/lib/spawn-pipe.c
+++ b/lib/spawn-pipe.c
@@ -16,6 +16,11 @@
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+/* Tell clang not to warn about the 'child' variable, below.  */
+#if defined __clang__
+# pragma clang diagnostic ignored "-Wconditional-uninitialized"
 #include <config.h>
 /* Specification.  */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]