Hi,
Some unused variables in vi were identified by gcc 4.9.4.
- Michael
Index: common/recover.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/recover.c,v
retrieving revision 1.25
diff -u -p -u -r1.25 recover.c
--- common/recover.c 29 Jun 2016 20:38:39 -0000 1.25
+++ common/recover.c 19 Apr 2017 02:45:32 -0000
@@ -313,7 +313,6 @@ static int
rcv_mailfile(SCR *sp, int issync, char *cp_path)
{
EXF *ep;
- GS *gp;
struct passwd *pw;
size_t len;
time_t now;
@@ -323,7 +322,6 @@ rcv_mailfile(SCR *sp, int issync, char *
char *t1, *t2, *t3;
char host[HOST_NAME_MAX+1];
- gp = sp->gp;
if ((pw = getpwuid(uid = getuid())) == NULL) {
msgq(sp, M_ERR,
"Information on user id %u not found", uid);
Index: ex/ex_bang.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_bang.c,v
retrieving revision 1.11
diff -u -p -u -r1.11 ex_bang.c
--- ex/ex_bang.c 18 Apr 2017 01:45:35 -0000 1.11
+++ ex/ex_bang.c 19 Apr 2017 02:45:32 -0000
@@ -52,7 +52,6 @@ ex_bang(SCR *sp, EXCMD *cmdp)
EX_PRIVATE *exp;
MARK rm;
recno_t lno;
- int rval;
const char *msg;
ap = cmdp->argv[0];
@@ -145,7 +144,7 @@ ex_bang(SCR *sp, EXCMD *cmdp)
ftype = FILTER_RBANG;
}
}
- rval = ex_filter(sp, cmdp,
+ (void)ex_filter(sp, cmdp,
&cmdp->addr1, &cmdp->addr2, &rm, ap->bp, ftype);
/*
Index: ex/ex_global.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_global.c,v
retrieving revision 1.17
diff -u -p -u -r1.17 ex_global.c
--- ex/ex_global.c 27 May 2016 09:18:12 -0000 1.17
+++ ex/ex_global.c 19 Apr 2017 02:45:32 -0000
@@ -67,7 +67,6 @@ ex_g_setup(SCR *sp, EXCMD *cmdp, enum wh
RANGE *rp;
busy_t btype;
recno_t start, end;
- regex_t *re;
regmatch_t match[1];
size_t len;
int cnt, delim, eval;
@@ -146,7 +145,6 @@ usage: ex_emsg(sp, cmdp->cmd->usage, EX
*/
sp->searchdir = FORWARD;
}
- re = &sp->re_c;
/* The global commands always set the previous context mark. */
abs_mark.lno = sp->lno;
Index: vi/vs_split.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/vi/vs_split.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 vs_split.c
--- vi/vs_split.c 27 May 2016 09:18:12 -0000 1.16
+++ vi/vs_split.c 19 Apr 2017 02:45:32 -0000
@@ -458,11 +458,8 @@ vs_swap(SCR *sp, SCR **nspp, char *name)
int
vs_resize(SCR *sp, long count, adj_t adj)
{
- GS *gp;
SCR *g, *s;
size_t g_off, s_off;
-
- gp = sp->gp;
/*
* Figure out which screens will grow, which will shrink, and