msgpack / msgpack-php

msgpack.org[PHP]
BSD 3-Clause "New" or "Revised" License
773 stars 119 forks source link

Compilation error reported #168

Closed anehqiaoxia closed 1 year ago

anehqiaoxia commented 1 year ago

ck/msgpack_pack.c -fPIC -DPIC -o .libs/msgpack_pack.o In file included from /tmp/pear/temp/msgpack/msgpack_pack.c:4: In function ‘smart_str_appendl_ex’, inlined from ‘msgpack_pack_long’ at /tmp/pear/temp/msgpack/msgpack/pack_template.h:468:5: /usr/include/php/20190902/Zend/zend_smart_str.h:121:2: warning: writing 2 bytes into a region of size 1 [-Wstringop-overflow=] 121 | memcpy(ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s), str, len); | ^~~~~~~~~~~~~~~ In function ‘smart_str_appendl_ex’, inlined from ‘msgpack_pack_long’ at /tmp/pear/temp/msgpack/msgpack/pack_template.h:468:5: /usr/include/php/20190902/Zend/zend_smart_str.h:121:2: warning: writing 2 bytes into a region of size 1 [-Wstringop-overflow=] 121 | memcpy(ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s), str, len); | ^~~~~~~~~~~~~~~ In function ‘smart_str_appendl_ex’, inlined from ‘msgpack_pack_str’ at /tmp/pear/temp/msgpack/msgpack/pack_template.h:763:9: /usr/include/php/20190902/Zend/zend_smart_str.h:121:2: warning: writing 2 bytes into a region of size 1 [-Wstringop-overflow=] 121 | memcpy(ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s), str, len); | ^~~~~~~~~~~~~~~

Jan-E commented 1 year ago

For PHP 7.4 try release 2.1.1 https://github.com/msgpack/msgpack-php/releases/tag/msgpack-2.1.1 Or 2.1.2 https://github.com/msgpack/msgpack-php/releases/tag/msgpack-2.1.2

m6w6 commented 1 year ago

Huh? These are warnings?

Jan-E commented 1 year ago

Right. I did not notice that yet,