This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Cast PL_dump_re_max_len to avoid type mismatch warning.
authorCraig A. Berry <craigberry@mac.com>
Fri, 19 Feb 2016 21:33:10 +0000 (15:33 -0600)
committerCraig A. Berry <craigberry@mac.com>
Fri, 19 Feb 2016 22:02:19 +0000 (16:02 -0600)
Specifically this one on VMS:

    || ! grok_atoUV(dump_len_string, &PL_dump_re_max_len, NULL))
.....................................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the
pointer value "&(my_perl->Idump_re_max_len)" is "unsigned int",
which is not compatible with "unsigned long".

This was new code in 2bfbbbaf9ef1783ba.

regcomp.c

index 820bd92..e337183 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -6720,7 +6720,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
 #ifdef DEBUGGING
         dump_len_string = PerlEnv_getenv("PERL_DUMP_RE_MAX_LEN");
         if (   ! dump_len_string
-            || ! grok_atoUV(dump_len_string, &PL_dump_re_max_len, NULL))
+            || ! grok_atoUV(dump_len_string, (UV *)&PL_dump_re_max_len, NULL))
         {
             PL_dump_re_max_len = 0;
         }