Naturally, one of the first things I did when I got the new mac was to try compiling my software, XML::Genx, on it. Sadly, it throws up a number of errors.
Genx.xs: In function 'string_sender_write': Genx.xs:209: warning: pointer targets in passing argument 3 of 'Perl_sv_catpv' differ in signedness Genx.xs: In function 'string_sender_write_bounded': Genx.xs:223: warning: pointer targets in passing argument 3 of 'Perl_sv_catpvn_flags' differ in signedness Genx.xs: In function 'XS_XML__Genx_ScrubText': Genx.xs:606: warning: pointer targets in passing argument 2 of 'genxScrubText' differ in signedness Genx.xs:606: warning: pointer targets in passing argument 3 of 'genxScrubText' differ in signedness Genx.c: In function 'XS_XML__Genx__Namespace_GetNamespacePrefix': Genx.c:1068: warning: pointer targets in passing argument 3 of 'Perl_sv_setpv' differ in signedness
Looking around the web, it appears that this is a new warning in gcc 4.0. It also baffles me that that apple would have considered using signed characters for anything by default. However, the obvious fix doesn’t work.
- sv_catpv( *svp, s ); + sv_catpv( *svp, (signed char *)s );
At this point, I suspect that my knowledge of C is fundamentally lacking. Does anybody out there have any ideas what I need to do to fix this warning? The source is string_sender_write()
in Genx.xs, although you’ll probably also want genx.h to look for the typedefs.
Sadly, the gcc manual doesn’t have much to say, except to note the existence of -Wno-pointer-sign to disable the warning. But I’d rather fix it if I can.