avoid compiler casting warnings
Robin Barker [Tue, 7 May 2002 16:13:34 +0000 (17:13 +0100)]
Message-Id: <200205071513.QAA05846@tempest.npl.co.uk>

p4raw-id: //depot/perl@16445

ext/Encode/Encode.xs

index dc2ab42..28115bc 100644 (file)
@@ -172,14 +172,14 @@ encode_method(pTHX_ encode_t * enc, encpage_t * dir, SV * src,
            else {
                if (check & ENCODE_DIE_ON_ERR){
                    Perl_croak(aTHX_ ERR_DECODE_NOMAP,
-                              (UV)enc->name[0], (U8)s[slen]);
+                              PTR2UV(enc->name[0]), (U8)s[slen]);
                    return &PL_sv_undef; /* never reaches but be safe */
                }
                if (check & ENCODE_WARN_ON_ERR){
                    Perl_warner(
                        aTHX_ packWARN(WARN_UTF8),
                        ERR_DECODE_NOMAP,
-                       (UV)enc->name[0], (U8)s[slen]);
+                       PTR2UV(enc->name[0]), (U8)s[slen]);
                }
                if (check & ENCODE_RETURN_ON_ERR){
                    goto ENCODE_SET_SRC;