diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-09 12:23:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-09 14:46:05 +0000 |
commit | 6486978435a2f29853cb3a832f87c049b65c7068 (patch) | |
tree | 080bddbff0a7ebe66c30539f9181f7c236d735e8 /soltools | |
parent | rename to with_themes, and test scp2 a little (diff) | |
download | core-6486978435a2f29853cb3a832f87c049b65c7068.tar.gz core-6486978435a2f29853cb3a832f87c049b65c7068.zip |
cppcheck: can reduce the scope of these variables
Diffstat (limited to 'soltools')
-rw-r--r-- | soltools/cpp/_macro.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c index c61798704711..d1775c6a1f64 100644 --- a/soltools/cpp/_macro.c +++ b/soltools/cpp/_macro.c @@ -46,14 +46,13 @@ void args = NULL; if (tp < trp->lp && tp->type == LP && tp->wslen == 0) { - /* macro with args */ - int narg = 0; - tp += 1; args = new(Tokenrow); maketokenrow(2, args); if (tp->type != RP) { + /* macro with args */ + int narg = 0; int err = 0; for (;;) @@ -295,7 +294,7 @@ void { // Token * pOldNextTp; Tokenrow ntr; - int ntokc, narg, i; + int ntokc, narg; Tokenrow *atr[NARG + 1]; if (Mflag == 2) @@ -311,6 +310,8 @@ void ntokc = 1; else { + int i; + ntokc = gatherargs(trp, atr, &narg); if (narg < 0) { /* not actually a call (no '(') */ |