Skip to content

Commit e0c9a75

Browse files
author
Victor Stinner
committed
faulthandler: make quiet a gcc 4.6 warning (z was unused)
1 parent 502ff6c commit e0c9a75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Modules/faulthandler.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,9 +805,12 @@ faulthandler_sigfpe(PyObject *self, PyObject *args)
805805
PowerPC. Use volatile to disable compile-time optimizations. */
806806
volatile int x = 1, y = 0, z;
807807
z = x / y;
808-
/* if the division by zero didn't raise a SIGFPE, raise it manually */
808+
/* if the division by zero didn't raise a SIGFPE (e.g. on PowerPC),
809+
raise it manually */
809810
raise(SIGFPE);
810-
Py_RETURN_NONE;
811+
/* use z to make quiet a compiler warning, but this line
812+
is never reached */
813+
return PyLong_FromLong(z);
811814
}
812815

813816
static PyObject *

0 commit comments

Comments
 (0)