summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/mg/interpreter.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/mg/interpreter.c b/usr.bin/mg/interpreter.c
index 320b4089849..92969394f48 100644
--- a/usr.bin/mg/interpreter.c
+++ b/usr.bin/mg/interpreter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interpreter.c,v 1.32 2021/05/12 11:13:23 lum Exp $ */
+/* $OpenBSD: interpreter.c,v 1.33 2022/01/20 14:07:34 naddy Exp $ */
/*
* This file is in the public domain.
*
@@ -492,9 +492,8 @@ multiarg(char *cmdp, char *argbuf, int numparams)
if (!doregex(regs, argp)) {
const char *errstr;
- int iters;
- iters = strtonum(argp, 0, INT_MAX, &errstr);
+ strtonum(argp, 0, INT_MAX, &errstr);
if (errstr != NULL)
return (dobeep_msgs("Var not found:",
argp));
@@ -628,7 +627,7 @@ expandvals(char *cmdp, char *valp, char *bp)
char *argp, *endp, *p, *v, *s = " ";
char *regs;
int spc, cnt;
- int inlist, sizof, fin, inquote;
+ int sizof, fin, inquote;
/* now find the first argument */
p = skipwhite(valp);
@@ -637,7 +636,7 @@ expandvals(char *cmdp, char *valp, char *bp)
return (dobeep_msg("strlcpy error"));
argp = argbuf;
spc = 1; /* initially fake a space so we find first argument */
- inlist = fin = inquote = cnt = spc = 0;
+ fin = inquote = cnt = spc = 0;
for (p = argbuf; *p != '\0'; p++) {
if (*(p + 1) == '\0')
@@ -693,9 +692,8 @@ expandvals(char *cmdp, char *valp, char *bp)
continue;
} else {
const char *errstr;
- int iters;
- iters = strtonum(argp, 0, INT_MAX, &errstr);
+ strtonum(argp, 0, INT_MAX, &errstr);
if (errstr != NULL)
return (dobeep_msgs("Var not found:",
argp));