[Libreoffice-commits] .: soltools/cpp
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Dec 9 07:12:33 PST 2010
soltools/cpp/_macro.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit f02a478020907fc84b0cafe6d7549a6a6e1b5144
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 9 12:23:06 2010 +0000
cppcheck: can reduce the scope of these variables
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c
index f6a778a..600cc1a 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 '(') */
More information about the Libreoffice-commits
mailing list