This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Silence two build warnings on systems where ivsize > ptrsize.
authorEric Brine\" (via RT) <perlbug-followup@perl.org>
Tue, 13 Nov 2012 10:42:47 +0000 (02:42 -0800)
committerKarl Williamson <public@khwilliamson.com>
Tue, 13 Nov 2012 15:15:16 +0000 (08:15 -0700)
# New Ticket Created by  "Eric Brine"
# Please include the string:  [perl #115710]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115710 >

This is a bug report for perl from ikegami@adaelis.com,
generated with the help of perlbug 1.39 running under perl 5.14.2.

-----------------------------------------------------------------
[Please describe your issue here]

Attached patch silences two build warnings on systems where ivsize >
ptrsize.

They are safe to ignore, a side-effect of a function with a polymorphic
interface.

cv = find_runcv_where(FIND_RUNCV_level_eq, iv,        NULL);
cv = find_runcv_where(FIND_RUNCV_padid_eq, PTR2IV(p), NULL);  // p is a
PADNAMELIST*

[Please do not change anything below this line]
-----------------------------------------------------------------

pad.c
pp_ctl.c

diff --git a/pad.c b/pad.c
index 2292aaf..cc34ade 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -1999,7 +1999,7 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside)
            || PadlistNAMES(CvPADLIST(outside))
                 != protopadlist->xpadl_outid) {
            outside = find_runcv_where(
-               FIND_RUNCV_padid_eq, (IV)protopadlist->xpadl_outid, NULL
+               FIND_RUNCV_padid_eq, PTR2IV(protopadlist->xpadl_outid), NULL
            );
            /* outside could be null */
        }
index 1f4afc0..5374e0f 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3263,7 +3263,7 @@ Perl_find_runcv_where(pTHX_ U8 cond, IV arg, U32 *db_seqp)
                switch (cond) {
                case FIND_RUNCV_padid_eq:
                    if (!CvPADLIST(cv)
-                    || PadlistNAMES(CvPADLIST(cv)) != (PADNAMELIST *)arg)
+                    || PadlistNAMES(CvPADLIST(cv)) != INT2PTR(PADNAMELIST *, arg))
                        continue;
                    return cv;
                case FIND_RUNCV_level_eq: