[Libreoffice-commits] .: idlc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Nov 24 02:53:04 PST 2010
idlc/source/preproc/macro.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit e809491b5f94de4343cce16de1452df8d732c71c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 08:54:31 2010 +0000
cppcheck: The scope of these variables can be reduced
diff --git a/idlc/source/preproc/macro.c b/idlc/source/preproc/macro.c
index 1d253d6..54c0268 100644
--- a/idlc/source/preproc/macro.c
+++ b/idlc/source/preproc/macro.c
@@ -76,14 +76,14 @@ 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 (;;)
@@ -301,7 +301,7 @@ void
expand(Tokenrow * trp, Nlist * np)
{
Tokenrow ntr;
- int ntokc, narg, i;
+ int ntokc, narg;
Tokenrow *atr[NARG + 1];
if (Mflag == 2)
@@ -317,6 +317,8 @@ void
ntokc = 1;
else
{
+ int i;
+
ntokc = gatherargs(trp, atr, &narg);
if (narg < 0)
{ /* not actually a call (no '(') */
@@ -330,7 +332,7 @@ void
return;
}
substargs(np, &ntr, atr); /* put args into replacement */
- for (i = 0; i < narg; i++)
+ for (i = 0; i < narg; ++i)
{
dofree(atr[i]->bp);
dofree(atr[i]);
More information about the Libreoffice-commits
mailing list