Closed nichenke closed 8 years ago
Oh, thanks, this was quite an interesting issue! This looks to be a GCC warning that is only triggered in -O3
mode. The default image has -O2
as you pasted above, but the python2.7 image has the following command line:
# python setup.py build
running build
running build_ext
building 'xattr' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC …
Note the -O3
which follows the default -O2
. If I remove that, the warning disappears. The reason why it happens is that gcc estimates correctly - there are some code paths where that variable is not initialized, but the code flow ensure they won't be reached; however, gcc is not able to verify this, so it emits this warning. I'll have a trivial fix out soon.
Thanks for reporting!
Note to self: a very good discussionon why whis happens with -O3
but not with -O2
is at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60165.
FYI, this was released in 0.6.0, and is in pyxattr. Didn't check if docker image works though.
When using the default docker image for python2.7, the compile fails in a really odd way. I'm not sure if this is a tricky thing for pyxattr or a problem with the docker python:2.7 images as compared to Debian Jessie.
Reproduce:
Error:
This seems to work just fine on the official jessie image
...snipped..