This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
A malloc cast in vms/vms.c.
authorCraig A. Berry <craigberry@mac.com>
Thu, 5 Jun 2014 20:42:34 +0000 (15:42 -0500)
committerCraig A. Berry <craigberry@mac.com>
Thu, 5 Jun 2014 20:42:34 +0000 (15:42 -0500)
C didn't notice this with standard warnings enabled, but C++ takes
vengeance, so cast appropriately.

vms/vms.c

index 324cfa1..4e37b6c 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -9682,7 +9682,7 @@ vms_image_init(int *argcp, char ***argvp)
     tabvec[tabidx]->dsc$w_length  = len;
     tabvec[tabidx]->dsc$b_dtype   = DSC$K_DTYPE_T;
     tabvec[tabidx]->dsc$b_class   = DSC$K_CLASS_S;
-    tabvec[tabidx]->dsc$a_pointer = PerlMem_malloc(len + 1);
+    tabvec[tabidx]->dsc$a_pointer = (char *)PerlMem_malloc(len + 1);
     if (tabvec[tabidx]->dsc$a_pointer == NULL) _ckvmssts_noperl(SS$_INSFMEM);
     my_strlcpy(tabvec[tabidx]->dsc$a_pointer, eqv, len + 1);
   }