S_pop_eval_context_maybe_croak: silence warning blead
authorDavid Mitchell <davem@iabyn.com>
Fri, 22 Jul 2016 22:21:49 +0000 (23:21 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 22 Jul 2016 22:21:49 +0000 (23:21 +0100)
g++ is too dumb to notice that in

    SV *s;

    if (foo)
        s = ...;
    ...;
    if (foo)
        ...do something with s...;

s can't be used uninitialised.

pp_ctl.c

index 5a66e26..155349e 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1598,7 +1598,7 @@ Perl_qerror(pTHX_ SV *err)
 static void
 S_pop_eval_context_maybe_croak(pTHX_ PERL_CONTEXT *cx, SV *errsv, int action)
 {
-    SV  *namesv;
+    SV  *namesv = NULL; /* init to avoid dumb compiler warning */
     bool do_croak;
 
     CX_LEAVE_SCOPE(cx);