You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building with tests enabled and without the custom allocator, the build fails. There are two classes of failure:
a)
[ 61%] Building C object test/CMakeFiles/memory_allocation_test.dir/memory_allocation_test.c.o
/home/ubuntu/git/packages/libcbor/libcbor/test/memory_allocation_test.c: In function ‘main’:
/home/ubuntu/git/packages/libcbor/libcbor/test/memory_allocation_test.c:278:37: warning: ISO C forbids empty initializer braces [-Wpedantic]
278 | const struct CMUnitTest tests[] = {};
| ^
/home/ubuntu/git/packages/libcbor/libcbor/test/memory_allocation_test.c:278:27: error: zero or negative size array ‘tests’
278 | const struct CMUnitTest tests[] = {};
| ^~~~~
and
b)
/home/ubuntu/git/packages/libcbor/libcbor/test/memory_allocation_test.c:238:13: warning: ‘test_map_add’ defined but not used [-Wunused-function]
238 | static void test_map_add(void **state) {
| ^~~~~~~~~~~~
The memory_allocation_test.c code tries to cope with CBOR_CUSTOM_ALLOC being unset, but the gcc warnings (treated as errors) trip it.
I think this test file should be removed from the list when CBOR_CUSTOM_ALLOC is false or undefined.
The text was updated successfully, but these errors were encountered:
When building with tests enabled and without the custom allocator, the build fails. There are two classes of failure:
a)
and
b)
The
memory_allocation_test.c
code tries to cope withCBOR_CUSTOM_ALLOC
being unset, but the gcc warnings (treated as errors) trip it.I think this test file should be removed from the list when CBOR_CUSTOM_ALLOC is false or undefined.
The text was updated successfully, but these errors were encountered: