From: Rémi Lapeyre Date: Fri, 3 May 2019 23:30:53 +0000 (+0200) Subject: Suppress clang warning (GH-12384) X-Git-Tag: v3.8.0a4~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0900199d53df97bd792ac5a1678f8c477f117bb;p=thirdparty%2FPython%2Fcpython.git Suppress clang warning (GH-12384) --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 56ec3ee5a0ee..221f7101b213 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1259,7 +1259,8 @@ _Py_Sigset_Converter(PyObject *obj, void *addr) long signum; int overflow; - if (sigemptyset(mask)) { + // The extra parens suppress the unreachable-code warning with clang on MacOS + if (sigemptyset(mask) < (0)) { /* Probably only if mask == NULL. */ PyErr_SetFromErrno(PyExc_OSError); return 0;