summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-07-21 17:52:13 -0400
committerPaul Smith <psmith@gnu.org>2013-07-21 17:52:13 -0400
commitde9068a389bb4f9dbd952abafbd63d90af463320 (patch)
tree78ca3b513d6d7e662117fc824c40f2db2b521b85 /read.c
parent5b231449e7ec28efb834ef929b20198a13d8d2d4 (diff)
downloadmake-de9068a389bb4f9dbd952abafbd63d90af463320.tar.gz
[Bug #39158] Source cleanups suggested by cppcheck utility.
Diffstat (limited to 'read.c')
-rw-r--r--read.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/read.c b/read.c
index 07bc8da9..bc78fa51 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)
{