From: Vincent Pit Date: Sun, 21 Sep 2008 22:24:47 +0000 (+0200) Subject: Silence three 'mixed declaration and code' warnings X-Git-Tag: v0.21_01~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=72f4e75c55424386dea278545b88d459fe9c9915;hp=7b1220ee669f6512dea7d451111083763344094d;p=perl%2Fmodules%2FVariable-Magic.git Silence three 'mixed declaration and code' warnings --- diff --git a/Magic.xs b/Magic.xs index 731c084..6c5b616 100644 --- a/Magic.xs +++ b/Magic.xs @@ -652,8 +652,11 @@ STATIC int vmg_wizard_free(pTHX_ SV *wiz, MAGIC *mg) { w->owner = NULL; #endif /* VMG_MULTIPLICITY */ - dMY_CXT; - wiz = hv_delete(MY_CXT, buf, sprintf(buf, "%u", w->sig), 0); + { + dMY_CXT; + if (hv_delete(MY_CXT, buf, sprintf(buf, "%u", w->sig), 0) != wiz) + return 0; + } SvFLAGS(wiz) |= SVf_BREAK; FREETMPS; @@ -741,11 +744,11 @@ STATIC U16 vmg_wizard_sig(pTHX_ SV *wiz) { croak(vmg_invalid_wiz); } - dMY_CXT; - - if (!hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0)) - sig = 0; - + { + dMY_CXT; + if (!hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0)) + sig = 0; + } return sig; } @@ -768,10 +771,11 @@ STATIC SV *vmg_wizard_wiz(pTHX_ SV *wiz) { croak(vmg_invalid_wiz); } - dMY_CXT; - - return (old = hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0)) - ? *old : NULL; + { + dMY_CXT; + return (old = hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0)) + ? *old : NULL; + } } #define VMG_SET_CB(S, N) \