Remove wrong cast to (void *), which fixes a gcc warning, and use
Marcus Holland-Moritz [Sat, 21 Jan 2006 15:31:06 +0000 (15:31 +0000)]
the return value of upg_version() at least once in the core.

p4raw-id: //depot/perl@26918

pp_ctl.c
util.c

index 4761ded..4a13be0 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3091,7 +3091,7 @@ PP(pp_require)
 
        sv = new_version(sv);
        if (!sv_derived_from(PL_patchlevel, "version"))
-           (void *)upg_version(PL_patchlevel);
+           upg_version(PL_patchlevel);
        if (cUNOP->op_first->op_type == OP_CONST && cUNOP->op_first->op_private & OPpCONST_NOVER) {
            if ( vcmp(sv,PL_patchlevel) < 0 )
                DIE(aTHX_ "Perls since %"SVf" too modern--this is %"SVf", stopped",
diff --git a/util.c b/util.c
index 9895f26..abbf4ed 100644 (file)
--- a/util.c
+++ b/util.c
@@ -4183,8 +4183,7 @@ Perl_new_version(pTHX_ SV *ver)
 #ifdef SvVOK
     }
 #endif
-    upg_version(rv);
-    return rv;
+    return upg_version(rv);
 }
 
 /*