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

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


https://hg.python.org/cpython/rev/5ecbe8a55ccd
changeset:   104107:5ecbe8a55ccd
branch:      3.6
parent:      104104:95549f4970d0
parent:      104106:dad879edefd2
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Tue Sep 27 22:04:45 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