Re: [PATCH]Fix function pointer correctness to prepare for future gcc changes

Sam Varshavchik <[email protected]> Fri, 21 Mar 2025 21:46:49 -0400
Newsgroups gmane.mail.imap.courier.general
Message-ID <[email protected]>
Hanno Böck writes:

> Hello,
>
> Future gcc versions will be stricter about mismatching function
> pointers. See, e.g.: https://bugs.gentoo.org/944900
>
> If you do not want to install future experimental gcc versions, this
> can already be tested with clang, which has an optional warning for it
> by setting CC="clang" and
> CFLAGS="-Wincompatible-function-pointer-types-strict
> -Werror=incompatible-function-pointer-types-strict"
>
> In starttls.c, courier sets the function child_handler() as the
> sa_handler for a sigaction struct. However, that expects an integer
> argument.
>
> The other two cases are mismatches where a function pointer expects a
> function with (void), while a () is given.
>
> After applying the patch, it compiles successfully with clang and the
> above warnings, and hopefully will also with gcc 15 (have not tested
> the latter).

Thanks for taking the time to chase this down, this was applied.

_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRupkKLJP96aW75pIOKYPgoojZS4gUCZ94WiQAKCRCKYPgoojZS
4qazAPoDWMfRwG78g7IGurzYyoSUM3CfIVTuVaOUg2FajrODyQEAtH4vf4+qZU5Y
xgIJ0hXsSGdrPdbraHJ9cQwRMpNYkQo=
=iE7r
-----END PGP SIGNATURE-----