[Python-checkins] cpython (3.5): 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/dad879edefd2
changeset:   104106:dad879edefd2
branch:      3.5
parent:      104103:9b8f0db1944f
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Tue Sep 27 22:03:51 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
@@ -522,7 +522,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