diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-05-06 10:16:02 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-05-06 10:17:11 +0100 |
commit | e94207f0054827b17e4288dc7a991b75906a5b1c (patch) | |
tree | f6eb46e9c8416f0076096fa29004c22a40328ab1 | |
parent | 007c123e562d5bde1d934fb84b696ea4329536e6 (diff) | |
download | perl-e94207f0054827b17e4288dc7a991b75906a5b1c.tar.gz |
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/.
-rw-r--r-- | ext/PerlIO-scalar/scalar.xs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs index 67f674a2a5..f2481f4197 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; |