office-gobmx/solenv/bin
Stephan Bergmann 4bbe329ef0 Avoid -Werror,-Wcast-function-type-mismatch
...as seen when building LOWA (i.e., --disable-dynloading) with a recent Clang
with
<999d4f8407>
"Split -Wcast-function-type into a separate group (#86131)", where
-Wcast-function-type-mismatch generally warns about casts between incompatible
function types...

> cppuhelper/source/shlib.cxx:294:23: error: cast from 'void *(*)(void *, void *)' to 'ImplementationConstructorFn *' (aka 'css::uno::XInterface *(*)(css::uno::XComponentContext *, const css::uno::Sequence<css::uno::Any> &)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
>   294 |                     = reinterpret_cast<ImplementationConstructorFn *>(
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   295 |                         map[i].constructor_function);
>       |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

...but not for the special case of casting from/to void(*)(void).

(Using the correct function type

> css::uno::XInterface * (*)(css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &)

throughout would be even better, but doesn't easily fit into this C code that is
included in low-level places that don't know those UNO types and is shared
between LOWA and Android etc.)

Change-Id: Ic4dbabbff0f772b34cf692db968c3ad257c37cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173463
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-09-17 21:01:48 +02:00
..
modules
add-modelines
assemble-flatpak-appdata.sh
assemble-flatpak-desktop.sh
assemble-flatpak.sh
bin_library_info.sh
call_installer.sh
clipatchconfig.pl
concat-deps.c
constructors.py
create-ids
create-tags
createcomponent.xslt
dbgsv.ini
desktop-translate.py
exectest.pl
finish-gbuild-trace.py
fix-includes.pl
gdb-core-bt.sh
gdb_cxa-atexit_trace-stdout
gdbtrycatchtrace
gdbtrycatchtrace-stdout
generate-flatpak-manifest.sh
generate-tokens.py
gentoken.py
getcompver.awk
hrcex
id-lang.map
image-sort.py
install-gdb-printers
install-sh
job-limiter.cpp
localestr
macosx-change-install-names.pl
macosx-codesign-app-bundle
macosx_menubar_modification.xsl
make-raspbian-root-tarball
make_installer.pl
mkdocs.Makefile
mkdocs.sh
mkdocs_portal.sh
mkonedoc.sh
native-code.py
ooinstall
optionalimplementations.xslt
pack_images.py
packcomponents.xslt
packregistry.xslt
par2script.pl
polib.py
pre2par.pl
removereportbuilder.xslt
run-configure
shortpath.cmd
uiex
uiimagelist.xsl
version.py
write_classpath.sh