diff options
-rw-r--r-- | mg.c | 27 | ||||
-rw-r--r-- | perl.c | 4 | ||||
-rw-r--r-- | scope.c | 2 |
3 files changed, 16 insertions, 17 deletions
@@ -3012,7 +3012,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) else if (strEQ(mg->mg_ptr+1, "ARNING_BITS")) { if ( ! (PL_dowarn & G_WARN_ALL_MASK)) { if (!SvPOK(sv)) { - free_and_set_cop_warnings(&PL_compiling, pWARN_STD); + free_and_set_cop_warnings(&PL_compiling, pWARN_STD); break; } { @@ -3024,23 +3024,22 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) not_all |= ptr[i] ^ 0x55; } if (!not_none) { - free_and_set_cop_warnings(&PL_compiling, pWARN_NONE); + free_and_set_cop_warnings(&PL_compiling, pWARN_NONE); } else if (len >= WARNsize && !not_all) { - free_and_set_cop_warnings(&PL_compiling, pWARN_ALL); - PL_dowarn |= G_WARN_ONCE ; - } - else { - STRLEN len; - const char *const p = SvPV_const(sv, len); + free_and_set_cop_warnings(&PL_compiling, pWARN_ALL); + PL_dowarn |= G_WARN_ONCE ; + } + else { + STRLEN len; + const char *const p = SvPV_const(sv, len); - PL_compiling.cop_warnings - = Perl_new_warnings_bitfield(aTHX_ PL_compiling.cop_warnings, - p, len); + PL_compiling.cop_warnings + = Perl_new_warnings_bitfield(aTHX_ PL_compiling.cop_warnings, + p, len); - if (isWARN_on(PL_compiling.cop_warnings, WARN_ONCE)) + if (isWARN_on(PL_compiling.cop_warnings, WARN_ONCE)) PL_dowarn |= G_WARN_ONCE ; - } - + } } } } @@ -3823,12 +3823,12 @@ Perl_moreswitches(pTHX_ const char *s) return s; case 'W': PL_dowarn = G_WARN_ALL_ON|G_WARN_ON; - free_and_set_cop_warnings(&PL_compiling, pWARN_ALL); + free_and_set_cop_warnings(&PL_compiling, pWARN_ALL); s++; return s; case 'X': PL_dowarn = G_WARN_ALL_OFF; - free_and_set_cop_warnings(&PL_compiling, pWARN_NONE); + free_and_set_cop_warnings(&PL_compiling, pWARN_NONE); s++; return s; case '*': @@ -1668,7 +1668,7 @@ Perl_leave_scope(pTHX_ I32 base) case SAVEt_COMPILE_WARNINGS: a0 = ap[0]; - free_and_set_cop_warnings(&PL_compiling, (STRLEN*) a0.any_ptr); + free_and_set_cop_warnings(&PL_compiling, (STRLEN*) a0.any_ptr); break; case SAVEt_PARSER: |