develooper Front page | perl.perl5.porters | Postings from February 2003

sign o' times

From:
Jarkko Hietaniemi
Date:
February 3, 2003 23:39
Subject:
sign o' times
Message ID:
20030204073855.GM5560@kosh.hut.fi
cc: Warning: Base64.xs, line 359: In the initializer for str, the referenced type of the pointer value "(unsigned char ...)(((sv)->sv_flags&(0X0000000000040000|0X0000000020000000))==(0X0000000000040000)?((len=((XPV ...)(sv)->sv_any)->xpv_cur),((XPV ...)(sv)->sv_any)->xpv_pv):Perl_sv_2pvbyte(...))" is "unsigned char", which is not compatible with "char". (ptrmismatch)
        char *str = (unsigned char*)SvPVbyte(sv, len);
--------------------^

Change 18651 by jhi@kosh on 2003/02/04 06:28:53

	signedness issue.

Affected files ...

... //depot/perl/ext/MIME/Base64/Base64.xs#7 edit

Differences ...

==== //depot/perl/ext/MIME/Base64/Base64.xs#7 (text) ====
Index: perl/ext/MIME/Base64/Base64.xs
--- perl/ext/MIME/Base64/Base64.xs.~1~	Tue Feb  4 09:38:24 2003
+++ perl/ext/MIME/Base64/Base64.xs	Tue Feb  4 09:38:24 2003
@@ -356,7 +356,7 @@
 
         PREINIT:
 	STRLEN len;
-	char *str = (unsigned char*)SvPVbyte(sv, len);
+	char *str = SvPVbyte(sv, len);
 	char const* end = str + len;
 	char *r;
 	char *whitespace = 0;
End of Patch.


-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About