eserte / perl-tk

the perl module Tk
https://metacpan.org/release/Tk
Other
44 stars 31 forks source link

Avoid using incompatible pointer type for `old_warn` #101

Open chrstphrchvz opened 6 months ago

chrstphrchvz commented 6 months ago

See https://github.com/eserte/perl-tk/issues/98#issuecomment-1944054296: Newer compilers may have -Werror=incompatible-pointer-types by default. PL_curcop->cop_warnings previously had type SV *, then STRLEN *, and now char * as of Perl 5.37.6. Since old_warn is only used to temporarily hold the value from PL_curcop->cop_warnings without dereferencing it, old_warn can instead be declared as void * regardless of Perl 5 version.