From 8422e7e438bf34c075af3b1b6380fe8c1fb82bf9 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Tue, 23 Aug 2016 16:15:30 +0200 Subject: [PATCH] Try a different way to silence GCC. On some distro's some versions of GCC warn about the unchecked result, even though it is casted to void. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 for the discussion. --- src/python.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python.c b/src/python.c index 27a1b25c..ec2317b3 100644 --- a/src/python.c +++ b/src/python.c @@ -1025,7 +1025,8 @@ static int cpy_init(void) { if (plugin_thread_create(&thread, NULL, cpy_interactive, pipefd + 1)) { ERROR("python: Error creating thread for interactive interpreter."); } - (void)read(pipefd[0], &buf, 1); + if(read(pipefd[0], &buf, 1)) + ; (void)close(pipefd[0]); } else { PyEval_InitThreads(); -- 2.11.0