This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid an error that VC++'s resource compiler seems to have
[perl5.git] / perlio.c
index c15e7a8..30e3e6c 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -1431,8 +1431,9 @@ PerlIO_layer_from_ref(pTHX_ SV *sv)
        return PerlIO_find_layer(aTHX_ STR_WITH_LEN("Code"), 0);
     case SVt_PVGV:
        return PerlIO_find_layer(aTHX_ STR_WITH_LEN("Glob"), 0);
+    default:
+       return NULL;
     }
-    return NULL;
 }
 
 PerlIO_list_t *
@@ -5148,6 +5149,8 @@ PerlIO_vsprintf(char *s, int n, const char *fmt, va_list ap)
 {
     dTHX; 
     const int val = my_vsnprintf(s, n > 0 ? n : 0, fmt, ap);
+    PERL_UNUSED_CONTEXT;
+
 #ifndef PERL_MY_VSNPRINTF_GUARDED
     if (val < 0 || (n > 0 ? val >= n : 0)) {
        Perl_croak(aTHX_ "panic: my_vsnprintf overflow in PerlIO_vsprintf\n");