summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-31 18:07:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-31 18:07:42 +0000
commit1afd9d280bb0e2233cc039303a03959af86f233c (patch)
treefa1516d4bf450908c5a6333ecaffda953ed06ebe
parente1308124a54c14f5ce3ca729c696b0aed225f720 (diff)
downloadmandoc-1afd9d280bb0e2233cc039303a03959af86f233c.tar.gz
remove assignments that will be overwritten right afterwards,
and remove pointless local variables; found in a clang output from Ulrich Spoerlein <uqs at FreeBSD>
-rw-r--r--man_validate.c6
-rw-r--r--mandocdb.c1
-rw-r--r--term.c1
3 files changed, 1 insertions, 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++;