We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I got a compiler error on the below lines until I made the int to unsigned int cast. in refcount.h
lib/zenoh-pico/include/zenoh-pico/collections/refcount.h:48:101: note: mismatched types '_Tp*' and 'unsigned int' #define _ZP_RC_OP_DECR_AND_CMP _z_atomic_fetch_sub_explicit(&p->in->_cnt, 1, _z_memory_order_release) > 1
The number 1 is seen as a signed int, with an atomic operation to an unsigned int
#define _ZP_RC_OP_INIT_CNT _z_atomic_store_explicit(&p.in->_cnt, 1, _z_memory_order_relaxed); #define _ZP_RC_OP_INCR_CNT _z_atomic_fetch_add_explicit(&p->in->_cnt, 1, _z_memory_order_relaxed); #define _ZP_RC_OP_DECR_AND_CMP _z_atomic_fetch_sub_explicit(&p->in->_cnt, 1, _z_memory_order_release) > 1
changed to
#define _ZP_RC_OP_INIT_CNT _z_atomic_store_explicit(&p.in->_cnt, (unsigned int)1, _z_memory_order_relaxed); #define _ZP_RC_OP_INCR_CNT _z_atomic_fetch_add_explicit(&p->in->_cnt,(unsigned int) 1, _z_memory_order_relaxed); #define _ZP_RC_OP_DECR_AND_CMP _z_atomic_fetch_sub_explicit(&p->in->_cnt, (unsigned int)1, _z_memory_order_release) > 1
[env:esp32doit-devkit-v1] platform = espressif32 board = esp32doit-devkit-v1 framework = espidf lib_deps = zenoh-pico build_flags= -DZENOH_DEBUG=0 -DZENOH_COMPILER_GCC=1 -DZ_FEATURE_LINK_SERIAL=1 -DZ_FEATURE_MULTI_THREAD=1 -DZ_FEATURE_MULTICAST_TRANSPORT=0 -DZ_FEATURE_LINK_UDP_UNICAST=0 -DZ_FEATURE_SCOUTING_UDP=0 -DZ_FEATURE_LINK_TCP=0 -DZ_FEATURE_DYNAMIC_MEMORY_ALLOCATION=1
The text was updated successfully, but these errors were encountered:
Solved in #382
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
I got a compiler error on the below lines until I made the int to unsigned int cast. in refcount.h
The number 1 is seen as a signed int, with an atomic operation to an unsigned int
changed to
To reproduce
System info
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = espidf
lib_deps = zenoh-pico
build_flags=
-DZENOH_DEBUG=0
-DZENOH_COMPILER_GCC=1
-DZ_FEATURE_LINK_SERIAL=1
-DZ_FEATURE_MULTI_THREAD=1
-DZ_FEATURE_MULTICAST_TRANSPORT=0
-DZ_FEATURE_LINK_UDP_UNICAST=0
-DZ_FEATURE_SCOUTING_UDP=0
-DZ_FEATURE_LINK_TCP=0
-DZ_FEATURE_DYNAMIC_MEMORY_ALLOCATION=1
The text was updated successfully, but these errors were encountered: