[Python-checkins] cpython (merge 3.6 -> default): Issue #20947: Fixed a gcc warning with -Wstrict-overflow.

serhiy.storchaka python-checkins at python.org
Tue Sep 27 15:05:26 EDT 2016


https://hg.python.org/cpython/rev/675d3f76444d
changeset:   104108:675d3f76444d
parent:      104105:59268ac85f4e
parent:      104107:5ecbe8a55ccd
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Tue Sep 27 22:05:04 2016 +0300
summary:
  Issue #20947: Fixed a gcc warning with -Wstrict-overflow.

files:
  Modules/_posixsubprocess.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -521,7 +521,7 @@
         char *cur;
         _Py_write_noraise(errpipe_write, "OSError:", 8);
         cur = hex_errno + sizeof(hex_errno);
-        while (saved_errno != 0 && cur > hex_errno) {
+        while (saved_errno != 0 && cur != hex_errno) {
             *--cur = Py_hexdigits[saved_errno % 16];
             saved_errno /= 16;
         }

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list