This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
silence compiler warning in perly.y
authorDavid Mitchell <davem@iabyn.com>
Mon, 1 Aug 2016 16:20:27 +0000 (17:20 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Aug 2016 19:54:42 +0000 (20:54 +0100)
assigning a char from an I32 gives a warning. Add an explicit cast
as we know the int only ever holds a char.

perly.act
perly.h
perly.tab
perly.y

index 9a4d97f..878b1df 100644 (file)
--- a/perly.act
+++ b/perly.act
@@ -823,7 +823,7 @@ case 2:
 
                             if (PL_parser->sig_slurpy)
                                 yyerror("Multiple slurpy parameters not allowed");
-                            PL_parser->sig_slurpy = sigil;
+                            PL_parser->sig_slurpy = (char)sigil;
 
                             if (defexpr)
                                 yyerror("A slurpy parameter may not have "
@@ -1974,6 +1974,6 @@ case 2:
     
 
 /* Generated from:
- * 6abff06962c5ffb0c02363367269b330880b959867adae19ce57f4d14885b088 perly.y
+ * 218308e5b4f3720eeeba65e3c85ff9d92b85ab8f32d53eb3cbdaa99790b03a63 perly.y
  * 3e1dff60f26df8933d7aed0c0e87177a0f022c14800c0707eb62a7db4196ac98 regen_perly.pl
  * ex: set ro: */
diff --git a/perly.h b/perly.h
index 2aebf6a..20436f3 100644 (file)
--- a/perly.h
+++ b/perly.h
@@ -181,6 +181,6 @@ int yyparse (void);
 
 
 /* Generated from:
- * 6abff06962c5ffb0c02363367269b330880b959867adae19ce57f4d14885b088 perly.y
+ * 218308e5b4f3720eeeba65e3c85ff9d92b85ab8f32d53eb3cbdaa99790b03a63 perly.y
  * 3e1dff60f26df8933d7aed0c0e87177a0f022c14800c0707eb62a7db4196ac98 regen_perly.pl
  * ex: set ro: */
index eccde3e..dbe1d95 100644 (file)
--- a/perly.tab
+++ b/perly.tab
@@ -1109,6 +1109,6 @@ static const toketypes yy_type_tab[] =
 };
 
 /* Generated from:
- * 6abff06962c5ffb0c02363367269b330880b959867adae19ce57f4d14885b088 perly.y
+ * 218308e5b4f3720eeeba65e3c85ff9d92b85ab8f32d53eb3cbdaa99790b03a63 perly.y
  * 3e1dff60f26df8933d7aed0c0e87177a0f022c14800c0707eb62a7db4196ac98 regen_perly.pl
  * ex: set ro: */
diff --git a/perly.y b/perly.y
index 86e9681..6ffe051 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -659,7 +659,7 @@ sigslurpelem: sigslurpsigil sigvarname sigdefault/* def only to catch errors */
 
                             if (PL_parser->sig_slurpy)
                                 yyerror("Multiple slurpy parameters not allowed");
-                            PL_parser->sig_slurpy = sigil;
+                            PL_parser->sig_slurpy = (char)sigil;
 
                             if (defexpr)
                                 yyerror("A slurpy parameter may not have "