mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
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>
This commit is contained in:
parent
4273a5edc8
commit
290c36bc50
3 changed files with 23 additions and 11 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue