mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
Otherwise, when building with fortify-headers, I get an error because the compiler doesn't know pwtest_ptr_notnull will not return if the passed pointer is null, so it doesn't know the pointer subsequently passed to memmove via pw_array_remove will be non-null. In file included from ../spa/include/spa/utils/defs.h:11, from ../spa/include/spa/utils/string.h:15, from ../test/pwtest.h:15, from ../test/test-array.c:7: In function ‘memmove’, inlined from ‘array_test’ at ../test/test-array.c:66:2: /nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/string.h:77:16: error: argument 1 is null but the corresponding size argument 3 value is [8, 18446744073709551615] [-Werror=nonnull] 77 | return __orig_memmove(__d, __s, __n); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/string.h:77:16: warning: ‘__orig_memmove’ reading 8 or more bytes from a region of size 0 [-Wstringop-overread] In function ‘array_test’: cc1: note: source object is likely at address zero In file included from /nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/stdlib.h:33, from ../spa/include/spa/utils/string.h:11: /nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/string.h:69:1: note: in a call to function ‘__orig_memmove’ declared with attribute ‘access (read_only, 2, 3)’ 69 | _FORTIFY_FN(memmove) void *memmove(void * _FORTIFY_POS0 __d, | ^~~~~~~~~~~ |
||
|---|---|---|
| .. | ||
| data | ||
| avb-bugs.md | ||
| meson.build | ||
| pwtest-compat.c | ||
| pwtest-implementation.h | ||
| pwtest.c | ||
| pwtest.h | ||
| test-array.c | ||
| test-avb-utils.h | ||
| test-avb.c | ||
| test-client.c | ||
| test-config.c | ||
| test-context.c | ||
| test-example.c | ||
| test-functional.c | ||
| test-lib.c | ||
| test-logger.c | ||
| test-loop.c | ||
| test-map.c | ||
| test-mempool.c | ||
| test-properties.c | ||
| test-pwtest.c | ||
| test-spa-buffer.c | ||
| test-spa-control.c | ||
| test-spa-format.c | ||
| test-spa-json.c | ||
| test-spa-log.c | ||
| test-spa-node.c | ||
| test-spa-pod.c | ||
| test-spa-utils.c | ||
| test-support.c | ||
| test-utils.c | ||