Skip to content

compiler warnings of unknown severity #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ThomasWaldmann opened this issue Aug 29, 2015 · 1 comment · Fixed by #153
Closed

compiler warnings of unknown severity #146

ThomasWaldmann opened this issue Aug 29, 2015 · 1 comment · Fixed by #153

Comments

@ThomasWaldmann
Copy link
Contributor

Each time I install msgpack-python, I get these compiler warnings.

If some C developer could review these and fix the code, that would be great and avoid that users of msgpack-python have to worry about their data.

Downloading/unpacking msgpack-python>=0.4.6 (from borgbackup==0.24.0-73.g2332ee4)
  Downloading msgpack-python-0.4.6.tar.gz (116kB): 116kB downloaded
  Running setup.py (path:/home/tw/testing/build/msgpack-python/setup.py) egg_info for package msgpack-python

Installing collected packages: borgbackup, msgpack-python
  Running setup.py install for msgpack-python
    building 'msgpack._packer' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D__LITTLE_ENDIAN__=1 -I. -I/usr/include/python3.4m -I/home/tw/testing/include/python3.4m -c msgpack/_packer.cpp -o build/temp.linux-x86_64-3.4/msgpack/_packer.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
    x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/msgpack/_packer.o -o build/lib.linux-x86_64-3.4/msgpack/_packer.cpython-34m.so
    building 'msgpack._unpacker' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D__LITTLE_ENDIAN__=1 -I. -I/usr/include/python3.4m -I/home/tw/testing/include/python3.4m -c msgpack/_unpacker.cpp -o build/temp.linux-x86_64-3.4/msgpack/_unpacker.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
    msgpack/_unpacker.pyx: In function ‘PyObject* __pyx_pf_7msgpack_9_unpacker_2unpackb(PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*, PyObject*, PyObject*, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t)’:
    msgpack/_unpacker.pyx:141:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if off < buf_len:
                                     ^
    msgpack/_unpacker.pyx: In function ‘PyObject* __pyx_f_7msgpack_9_unpacker_8Unpacker_read_from_file(__pyx_obj_7msgpack_9_unpacker_Unpacker*)’:
    msgpack/_unpacker.pyx:367:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                         self.max_buffer_size - (self.buf_tail - self.buf_head)
                         ^
    msgpack/_unpacker.pyx: In function ‘PyObject* __pyx_pf_7msgpack_9_unpacker_8Unpacker_8read_bytes(__pyx_obj_7msgpack_9_unpacker_Unpacker*, Py_ssize_t)’:
    msgpack/_unpacker.pyx:412:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             nread = min(self.buf_tail - self.buf_head, nbytes)
                         ^
    In file included from msgpack/unpack.h:278:0,
                     from msgpack/_unpacker.cpp:241:
    msgpack/unpack_template.h: In function ‘int unpack_execute(unpack_context*, const char*, size_t, size_t*) [with bool construct = false; unpack_context = unpack_context; size_t = long unsigned int]’:
    msgpack/unpack_template.h:346:9: warning: ‘obj’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             c->map_key = obj;
             ^
    x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/msgpack/_unpacker.o -o build/lib.linux-x86_64-3.4/msgpack/_unpacker.cpython-34m.so

Successfully installed borgbackup msgpack-python

I'm using Ubuntu Linux 14.04 64bit in case that matters.

@ThomasWaldmann
Copy link
Contributor Author

anyone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant