diff options
| author | Simon Ser <contact@emersion.fr> | 2025-12-27 12:41:06 +0100 |
|---|---|---|
| committer | Daniel Stone <daniels@collabora.com> | 2026-01-08 11:09:24 +0000 |
| commit | 8c0947892b56c3df792b8557cbf33b54038d8a1c (patch) | |
| tree | 5d87bd8ed65c9188ef49f2f337f705991fd24c88 /pointer.c | |
| parent | server: document protocol logger callback function (diff) | |
| download | wayland-8c0947892b56c3df792b8557cbf33b54038d8a1c.tar wayland-8c0947892b56c3df792b8557cbf33b54038d8a1c.tar.gz wayland-8c0947892b56c3df792b8557cbf33b54038d8a1c.tar.bz2 wayland-8c0947892b56c3df792b8557cbf33b54038d8a1c.tar.lz wayland-8c0947892b56c3df792b8557cbf33b54038d8a1c.tar.xz wayland-8c0947892b56c3df792b8557cbf33b54038d8a1c.tar.zst wayland-8c0947892b56c3df792b8557cbf33b54038d8a1c.zip | |
tests: cast pid_t and struct timeval fields before printing
The exact type behind these might depend on the architecture. For
instance, on ARMv7, struct timeval fields are long long int instead
of long int:
FAILED: tests/libtest-runner.a.p/test-compositor.c.o
cc -Itests/libtest-runner.a.p -Itests -I../tests -I. -I.. -Isrc -I../src -fdiagnostics-color=always -fsanitize=address,undefined -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c99 -O0 -g -D_POSIX_C_SOURCE=200809L -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden -fPIC -pthread -MD -MQ tests/libtest-runner.a.p/test-compositor.c.o -MF tests/libtest-runner.a.p/test-compositor.c.o.d -o tests/libtest-runner.a.p/test-compositor.c.o -c ../tests/test-compositor.c
../tests/test-compositor.c: In function 'get_socket_name':
../tests/test-compositor.c:95:60: error: format '%ld' expects argument of type 'long int', but argument 5 has type '__time64_t' {aka 'long long int'} [-Werror=format=]
95 | snprintf(retval, sizeof retval, "wayland-test-%d-%ld%ld",
| ~~^
| |
| long int
| %lld
96 | getpid(), tv.tv_sec, tv.tv_usec);
| ~~~~~~~~~
| |
| __time64_t {aka long long int}
../tests/test-compositor.c:95:63: error: format '%ld' expects argument of type 'long int', but argument 6 has type '__suseconds64_t' {aka 'long long int'} [-Werror=format=]
95 | snprintf(retval, sizeof retval, "wayland-test-%d-%ld%ld",
| ~~^
| |
| long int
| %lld
96 | getpid(), tv.tv_sec, tv.tv_usec);
| ~~~~~~~~~~
| |
| __suseconds64_t {aka long long int}
Signed-off-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'pointer.c')
0 files changed, 0 insertions, 0 deletions
