From 87ac68fe79a2e3b0d149135d40d8cbc5500024af Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 21 Jul 2013 17:52:13 -0400 Subject: [Bug #39158] Source cleanups suggested by cppcheck utility. --- read.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'read.c') diff --git a/read.c b/read.c index 07bc8da..bc78fa5 100644 --- a/read.c +++ b/read.c @@ -1297,14 +1297,13 @@ eval (struct ebuffer *ebuf, int set_default) if (set_default && default_goal_var->value[0] == '\0') { - const char *name; struct dep *d; struct nameseq *t = filenames; for (; t != 0; t = t->next) { int reject = 0; - name = t->name; + const char *name = t->name; /* We have nothing to do if this is an implicit rule. */ if (strchr (name, '%') != 0) @@ -2981,7 +2980,6 @@ parse_file_seq (char **stringp, unsigned int size, int stopmap, /* tmp points to tmpbuf after the prefix, if any. tp is the end of the buffer. */ static char *tmpbuf = NULL; - static int tmpbuf_len = 0; int cachep = NONE_SET (flags, PARSEFS_NOCACHE); @@ -3009,6 +3007,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopmap, /* Get enough temporary space to construct the largest possible target. */ { + static int tmpbuf_len = 0; int l = strlen (*stringp) + 1; if (l > tmpbuf_len) { -- cgit v1.2.3