From: schwarze Date: Tue, 31 Dec 2013 18:07:06 +0000 (+0000) Subject: remove assignments that will be overwritten right afterwards, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8d3b2f73908238cdcfcacc50f720829d55ee582e;p=openbsd remove assignments that will be overwritten right afterwards, and remove pointless local variables; found in a clang output from Ulrich Spoerlein --- diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index 8f2ed6dd8a9..54a4f5acdfc 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.58 2013/10/17 20:51:31 schwarze Exp $ */ +/* $Id: man_validate.c,v 1.59 2013/12/31 18:07:06 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013 Ingo Schwarze @@ -391,7 +391,6 @@ static int post_TH(CHKARGS) { const char *p; - int line, pos; free(man->meta.title); free(man->meta.vol); @@ -399,8 +398,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; @@ -434,9 +431,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/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index 84847d97d0a..f1935546080 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.47 2013/12/31 00:40:19 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.48 2013/12/31 18:07:06 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -1726,7 +1726,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/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c index 795a3fdb167..fb0d370a3b9 100644 --- a/usr.bin/mandoc/term.c +++ b/usr.bin/mandoc/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.75 2013/12/25 00:39:13 schwarze Exp $ */ +/* $Id: term.c,v 1.76 2013/12/31 18:07:06 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze @@ -655,7 +655,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++;