summaryrefslogtreecommitdiffstats
path: root/usr.bin/rcs
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2014-10-10 08:15:25 +0000
committerotto <otto@openbsd.org>2014-10-10 08:15:25 +0000
commit9344339577954f494d1deda0d4551b6b5d816f16 (patch)
tree94a50a15981c65b50f3e934768d1419598ea4ffb /usr.bin/rcs
parentExplicitly handle -l and -u combinations. From Fritjof Bornebusch; ok daniel@ (diff)
downloadwireguard-openbsd-9344339577954f494d1deda0d4551b6b5d816f16.tar.xz
wireguard-openbsd-9344339577954f494d1deda0d4551b6b5d816f16.zip
Zap some stored values never read; From Fritjof Bornebusch; ok nicm@
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r--usr.bin/rcs/co.c5
-rw-r--r--usr.bin/rcs/diff.c4
-rw-r--r--usr.bin/rcs/merge.c3
-rw-r--r--usr.bin/rcs/rcs.c3
-rw-r--r--usr.bin/rcs/rcsmerge.c3
-rw-r--r--usr.bin/rcs/rcsparse.c4
-rw-r--r--usr.bin/rcs/rcsutil.c4
-rw-r--r--usr.bin/rcs/rlog.c4
8 files changed, 11 insertions, 19 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index efee26fd43c..1d3cdc5acf4 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.118 2014/10/02 06:23:15 otto Exp $ */
+/* $OpenBSD: co.c,v 1.119 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -56,7 +56,6 @@ checkout_main(int argc, char **argv)
flags = ret = 0;
kflag = RCS_KWEXP_ERR;
- rev = RCS_HEAD_REV;
rev_str = NULL;
author = date = state = NULL;
@@ -256,7 +255,7 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags,
time_t rcsdate, givendate;
RCSNUM *rev;
- rcsdate = givendate = -1;
+ givendate = -1;
if (date != NULL && (givendate = date_parse(date)) == -1) {
warnx("invalid date: %s", date);
return -1;
diff --git a/usr.bin/rcs/diff.c b/usr.bin/rcs/diff.c
index 260b2352882..ecc29c7799c 100644
--- a/usr.bin/rcs/diff.c
+++ b/usr.bin/rcs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.34 2013/05/16 12:44:48 stsp Exp $ */
+/* $OpenBSD: diff.c,v 1.35 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -1302,7 +1302,7 @@ dump_unified_vec(FILE *f1, FILE *f2, int flags)
if (context_vec_start > context_vec_ptr)
return;
- b = d = 0; /* gcc */
+ d = 0; /* gcc */
lowa = MAX(1, cvp->a - diff_context);
upb = MIN(len[0], context_vec_ptr->b + diff_context);
lowc = MAX(1, cvp->c - diff_context);
diff --git a/usr.bin/rcs/merge.c b/usr.bin/rcs/merge.c
index fa2977a37f4..63b4863860a 100644
--- a/usr.bin/rcs/merge.c
+++ b/usr.bin/rcs/merge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: merge.c,v 1.8 2014/10/02 06:23:15 otto Exp $ */
+/* $OpenBSD: merge.c,v 1.9 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -40,7 +40,6 @@ merge_main(int argc, char **argv)
BUF *bp;
flags = labels = 0;
- status = D_ERROR;
/*
* Using getopt(3) and not rcs_getopt() because merge(1)
diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c
index e296b88a0fe..cd86d6991a9 100644
--- a/usr.bin/rcs/rcs.c
+++ b/usr.bin/rcs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.80 2014/01/07 14:08:16 deraadt Exp $ */
+/* $OpenBSD: rcs.c,v 1.81 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -214,7 +214,6 @@ rcs_write(RCSFILE *rfp)
int fd;
fn = NULL;
- fd = -1;
if (rfp->rf_flags & RCS_SYNCED)
return;
diff --git a/usr.bin/rcs/rcsmerge.c b/usr.bin/rcs/rcsmerge.c
index 9ea825f5fa7..d5806e367f0 100644
--- a/usr.bin/rcs/rcsmerge.c
+++ b/usr.bin/rcs/rcsmerge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsmerge.c,v 1.53 2014/10/02 06:23:15 otto Exp $ */
+/* $OpenBSD: rcsmerge.c,v 1.54 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -44,7 +44,6 @@ rcsmerge_main(int argc, char **argv)
BUF *bp;
flags = 0;
- kflag = RCS_KWEXP_ERR;
status = D_ERROR;
rev1 = rev2 = NULL;
rev_str1 = rev_str2 = NULL;
diff --git a/usr.bin/rcs/rcsparse.c b/usr.bin/rcs/rcsparse.c
index f5f107ce871..1f37e66babd 100644
--- a/usr.bin/rcs/rcsparse.c
+++ b/usr.bin/rcs/rcsparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsparse.c,v 1.9 2013/06/03 17:04:35 jcs Exp $ */
+/* $OpenBSD: rcsparse.c,v 1.10 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (c) 2010 Tobias Stoeckmann <tobias@openbsd.org>
*
@@ -915,7 +915,6 @@ rcsparse_token(RCSFILE *rfp, int allowed)
} while (isspace(c));
pdp->rp_msglineno = pdp->rp_lineno;
- type = 0;
switch (c) {
case '@':
ret = rcsparse_string(rfp, allowed);
@@ -1104,7 +1103,6 @@ rcsparse(RCSFILE *rfp, struct rcs_section *sec)
int i, token;
pdp = (struct rcs_pdata *)rfp->rf_pdata;
- i = 0;
token = 0;
for (i = 0; sec[i].token != 0; i++) {
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c
index 473adab149a..5e7d936d448 100644
--- a/usr.bin/rcs/rcsutil.c
+++ b/usr.bin/rcs/rcsutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsutil.c,v 1.40 2014/05/29 16:39:42 tedu Exp $ */
+/* $OpenBSD: rcsutil.c,v 1.41 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -157,8 +157,6 @@ rcs_choosefile(const char *filename, char *out, size_t len)
char *p, *ext, name[MAXPATHLEN], *next, *ptr, rcsdir[MAXPATHLEN],
*suffixes, rcspath[MAXPATHLEN];
- fd = -1;
-
/*
* If `filename' contains a directory, `rcspath' contains that
* directory, including a trailing slash. Otherwise `rcspath'
diff --git a/usr.bin/rcs/rlog.c b/usr.bin/rcs/rlog.c
index 0cb09d3a118..a9ca9b7834e 100644
--- a/usr.bin/rcs/rlog.c
+++ b/usr.bin/rcs/rlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rlog.c,v 1.68 2014/10/02 06:23:15 otto Exp $ */
+/* $OpenBSD: rlog.c,v 1.69 2014/10/10 08:15:25 otto Exp $ */
/*
* Copyright (c) 2005, 2009 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -433,7 +433,7 @@ rlog_rev_print(struct rcs_delta *rdp)
struct rcs_branch *rb;
struct rcs_delta *nrdp;
- i = found = 0;
+ found = 0;
author = NULL;
/* -l[lockers] */