[Python-checkins] cpython: faulthandler: make quiet a gcc 4.6 warning (z was unused)

victor.stinner python-checkins at python.org
Mon May 9 14:46:19 CEST 2011


http://hg.python.org/cpython/rev/7a29f76db5c1
changeset: 69977:7a29f76db5c1
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Mon May 09 14:44:26 2011 +0200
summary:
 faulthandler: make quiet a gcc 4.6 warning (z was unused)
files:
 Modules/faulthandler.c | 7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -805,9 +805,12 @@
 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 *
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /