Skip to content

compiler warnings of unknown severity #146

Closed
@ThomasWaldmann

Description

@ThomasWaldmann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions