lockable: Do not cast function pointers
commita3b3ad72e81072321a7ea996d722c1eabaca7031
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Fri, 24 May 2024 05:35:48 +0000 (24 14:35 +0900)
committerThomas Huth <thuth@redhat.com>
Wed, 29 May 2024 10:41:56 +0000 (29 12:41 +0200)
treecfe0dddd71dae0c39ba95b6b4ba6b20cf2f240ae
parent2523baf7fb4ddca900647be7ac39bce31eae2d42
lockable: Do not cast function pointers

-fsanitize=undefined complains if function pointers are casted. It
also prevents enabling the strict mode of CFI which is currently
disabled with -fsanitize-cfi-icall-generalize-pointers.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2345
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240524-xkb-v4-2-2de564e5c859@daynix.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
include/qemu/lockable.h