[Python-checkins] cpython (3.5): Silence GCC warning.

serhiy.storchaka python-checkins at python.org
Thu Sep 22 13:01:54 EDT 2016


https://hg.python.org/cpython/rev/39ae3a9501ca
changeset: 104018:39ae3a9501ca
branch: 3.5
parent: 104011:e629aafdf777
user: Serhiy Storchaka <storchaka at gmail.com>
date: Thu Sep 22 19:59:46 2016 +0300
summary:
 Silence GCC warning.
The code was correct, but GCC is not enough clever.
files:
 Python/ceval.c | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Python/ceval.c b/Python/ceval.c
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2646,14 +2646,12 @@
 _build_map_unpack: {
 int with_call = opcode == BUILD_MAP_UNPACK_WITH_CALL;
 int num_maps;
- int function_location;
 int i;
 PyObject *sum = PyDict_New();
 if (sum == NULL)
 goto error;
 if (with_call) {
 num_maps = oparg & 0xff;
- function_location = (oparg>>8) & 0xff;
 }
 else {
 num_maps = oparg;
@@ -2666,6 +2664,7 @@
 
 if (intersection == NULL) {
 if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ int function_location = (oparg>>8) & 0xff;
 PyObject *func = (
 PEEK(function_location + num_maps));
 PyErr_Format(PyExc_TypeError,
@@ -2682,6 +2681,7 @@
 if (PySet_GET_SIZE(intersection)) {
 Py_ssize_t idx = 0;
 PyObject *key;
+ int function_location = (oparg>>8) & 0xff;
 PyObject *func = PEEK(function_location + num_maps);
 Py_hash_t hash;
 _PySet_NextEntry(intersection, &idx, &key, &hash);
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

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