From 1afd9d280bb0e2233cc039303a03959af86f233c Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 31 Dec 2013 18:07:42 +0000 Subject: remove assignments that will be overwritten right afterwards, and remove pointless local variables; found in a clang output from Ulrich Spoerlein --- man_validate.c | 6 +----- mandocdb.c | 1 - term.c | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/man_validate.c b/man_validate.c index ad923caf..2c64608c 100644 --- a/man_validate.c +++ b/man_validate.c @@ -395,7 +395,6 @@ static int post_TH(CHKARGS) { const char *p; - int line, pos; free(man->meta.title); free(man->meta.vol); @@ -403,8 +402,6 @@ post_TH(CHKARGS) free(man->meta.msec); free(man->meta.date); - line = n->line; - pos = n->pos; man->meta.title = man->meta.vol = man->meta.date = man->meta.msec = man->meta.source = NULL; @@ -438,9 +435,8 @@ post_TH(CHKARGS) if (n) n = n->next; if (n && n->string && '\0' != n->string[0]) { - pos = n->pos; man->meta.date = mandoc_normdate - (man->parse, n->string, line, pos); + (man->parse, n->string, n->line, n->pos); } else man->meta.date = mandoc_strdup(""); diff --git a/mandocdb.c b/mandocdb.c index 342539cc..80971027 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1734,7 +1734,6 @@ utf8key(struct mchars *mc, struct str *key) /* Read past the slash. */ val++; - u = 0; /* * Parse the escape sequence and see if it's a diff --git a/term.c b/term.c index e3eda82b..9f59d113 100644 --- a/term.c +++ b/term.c @@ -659,7 +659,6 @@ term_strlen(const struct termp *p, const char *cp) for (i = 0; i < rsz; i++) sz += cond_width(p, *cp++, &skip); - c = 0; switch (*cp) { case ('\\'): cp++; -- cgit