aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-compositor.c
diff options
context:
space:
mode:
authorDemi Marie Obenour <demi@invisiblethingslab.com>2024-08-05 12:49:49 -0400
committerDemi Marie Obenour <demi@invisiblethingslab.com>2024-11-30 11:31:36 -0500
commit290c36bc507d7d2f391b7eb1dc8fd9841c37e770 (patch)
tree86e61cf7610fb2956352e9bbf719954cd742292f /tests/test-compositor.c
parentconnection: Avoid undefined pointer arithmetic (diff)
downloadwayland-290c36bc507d7d2f391b7eb1dc8fd9841c37e770.tar
wayland-290c36bc507d7d2f391b7eb1dc8fd9841c37e770.tar.gz
wayland-290c36bc507d7d2f391b7eb1dc8fd9841c37e770.tar.bz2
wayland-290c36bc507d7d2f391b7eb1dc8fd9841c37e770.tar.lz
wayland-290c36bc507d7d2f391b7eb1dc8fd9841c37e770.tar.xz
wayland-290c36bc507d7d2f391b7eb1dc8fd9841c37e770.tar.zst
wayland-290c36bc507d7d2f391b7eb1dc8fd9841c37e770.zip
tests: Avoid calling function with wrong type
Calling a function with the wrong type is immediate undefined behavior, even if the ABI says it should be harmless. UBSAN picks it up immediately, and any decent control-flow integrity mechanism will as well. Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Diffstat (limited to 'tests/test-compositor.c')
-rw-r--r--tests/test-compositor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-compositor.c b/tests/test-compositor.c
index 8648fb6..8ec0631 100644
--- a/tests/test-compositor.c
+++ b/tests/test-compositor.c
@@ -507,7 +507,7 @@ static const struct wl_registry_listener registry_listener =
NULL
};
-struct client *client_connect()
+struct client *client_connect(void)
{
struct wl_registry *reg;
struct client *c = calloc(1, sizeof *c);