From: Nicholas Clark Date: Thu, 6 May 2010 09:16:02 +0000 (+0100) Subject: Move code to after the variable declarations. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e94207f0054827b17e4288dc7a991b75906a5b1c;p=p5sagit%2Fp5-mst-13.2.git Move code to after the variable declarations. Currently we only compile the top level code with "extreme warnings", so code in ext/ isn't subject to -Wdeclaration-after-statement, hence why this was missed. Now that dual life modules have been evicted from ext/, we could probably consider notching up the warnings for all code in ext/. --- diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs index 67f674a..f2481f4 100644 --- a/ext/PerlIO-scalar/scalar.xs +++ b/ext/PerlIO-scalar/scalar.xs @@ -85,9 +85,12 @@ IV PerlIOScalar_seek(pTHX_ PerlIO * f, Off_t offset, int whence) { PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); - SvGETMAGIC(s->var); - STRLEN oldcur = SvCUR(s->var); + STRLEN oldcur; STRLEN newlen; + + SvGETMAGIC(s->var); + oldcur = SvCUR(s->var); + switch (whence) { case SEEK_SET: s->posn = offset;