summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 12:44:26 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-09 12:44:26 (GMT)
commite0c9a7533cefe3b445a6b55b98f35bfe9dd6dd44 (patch)
tree40f209d6716e4b6b9c4432a3295614be2b4d1b26 /Modules
parent502ff6c920505e95ccfa9f93adc0b534ad76c6b3 (diff)
downloadcpython-e0c9a7533cefe3b445a6b55b98f35bfe9dd6dd44.zip
cpython-e0c9a7533cefe3b445a6b55b98f35bfe9dd6dd44.tar.gz
cpython-e0c9a7533cefe3b445a6b55b98f35bfe9dd6dd44.tar.bz2
faulthandler: make quiet a gcc 4.6 warning (z was unused)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/faulthandler.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 6041485..6cf06ad 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 *