From: Victor Stinner Date: Mon, 9 May 2011 12:44:26 +0000 (+0200) Subject: faulthandler: make quiet a gcc 4.6 warning (z was unused) X-Git-Tag: v3.3.0a1~2340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0c9a7533cefe3b445a6b55b98f35bfe9dd6dd44;p=python faulthandler: make quiet a gcc 4.6 warning (z was unused) --- diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 6041485b54..6cf06ad242 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -805,9 +805,12 @@ faulthandler_sigfpe(PyObject *self, PyObject *args) PowerPC. Use volatile to disable compile-time optimizations. */ volatile int x = 1, y = 0, z; z = x / y; - /* if the division by zero didn't raise a SIGFPE, raise it manually */ + /* if the division by zero didn't raise a SIGFPE (e.g. on PowerPC), + raise it manually */ raise(SIGFPE); - Py_RETURN_NONE; + /* use z to make quiet a compiler warning, but this line + is never reached */ + return PyLong_FromLong(z); } static PyObject *