MDEV-34348: MariaDB is violating clang-16 -Wcast-function-type-strict

This HEAD commit just makes cast-function-type-strict fatal.
It will stay at the HEAD, and prior commits contain the
actual fixes, organized by the part of the code that the fix
targets. Future changes will be force pushed to have their
fixes come before this HEAD.

This branch cherry-picks patches from daniel@mariadb.org
(in bb-10.5-MDEV-34508-ubsan-errors) which initially
incorporate the flag into the build, as well as fix some of
its findings.
This commit is contained in:
Brandon Nesterenko 2024-07-15 07:54:38 -06:00
parent 6456e437f2
commit 773cb726a8

View file

@ -39,12 +39,12 @@ SET(MY_WARNING_FLAGS
-Wsuggest-override
-Wvla
-Wwrite-strings
-Wcast-function-type-strict
)
# Warning flags that are in testing before moving
# to MY_WARNING_FLAGS if stable.
SET(MY_WARNING_FLAGS_NON_FATAL
cast-function-type-strict
)
FOREACH(F ${MY_WARNING_FLAGS})