Author serhiy.storchaka
Recipients Jeffrey.Walton, christian.heimes, martin.panter, serhiy.storchaka, vstinner
Date 2016-09-25.14:34:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474814051.5.0.410583049482.issue20947@psf.upfronthosting.co.za>
In-reply-to
Content
I can reproduce warnings in Modules/_posixsubprocess.c:

gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-overflow -I./Include -I. -I/usr/include/i386-linux-gnu -I/usr/local/include -I/home/serhiy/py/cpython/Include -I/home/serhiy/py/cpython -c /home/serhiy/py/cpython/Modules/_posixsubprocess.c -o build/temp.linux-i686-3.7/home/serhiy/py/cpython/Modules/_posixsubprocess.o
/home/serhiy/py/cpython/Modules/_posixsubprocess.c: In function ‘child_exec’:
/home/serhiy/py/cpython/Modules/_posixsubprocess.c:524:33: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
         while (saved_errno != 0 && cur > hex_errno) {
                                 ^
/home/serhiy/py/cpython/Modules/_posixsubprocess.c: In function ‘subprocess_fork_exec’:
/home/serhiy/py/cpython/Modules/_posixsubprocess.c:524:33: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
         while (saved_errno != 0 && cur > hex_errno) {
                                 ^
/home/serhiy/py/cpython/Modules/_posixsubprocess.c:544:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 subprocess_fork_exec(PyObject* self, PyObject *args)
 ^
/home/serhiy/py/cpython/Modules/_posixsubprocess.c:544:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
/home/serhiy/py/cpython/Modules/_posixsubprocess.c:524:33: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
         while (saved_errno != 0 && cur > hex_errno) {
                                 ^
/home/serhiy/py/cpython/Modules/_posixsubprocess.c:524:33: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]

Proposed simple patch fixes this.
History
Date User Action Args
2016-09-25 14:34:11serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, christian.heimes, martin.panter, Jeffrey.Walton
2016-09-25 14:34:11serhiy.storchakasetmessageid: <1474814051.5.0.410583049482.issue20947@psf.upfronthosting.co.za>
2016-09-25 14:34:11serhiy.storchakalinkissue20947 messages
2016-09-25 14:34:11serhiy.storchakacreate