sh: Remove unused return value of subevalvar_misc().
This commit is contained in:
parent
98b08fbea5
commit
56bf1d616f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315487
@ -97,7 +97,7 @@ static const char *expari(const char *, struct nodelist **restrict, int,
|
|||||||
struct worddest *);
|
struct worddest *);
|
||||||
static void expbackq(union node *, int, int, struct worddest *);
|
static void expbackq(union node *, int, int, struct worddest *);
|
||||||
static void subevalvar_trim(const char *, struct nodelist *, int, int, int);
|
static void subevalvar_trim(const char *, struct nodelist *, int, int, int);
|
||||||
static int subevalvar_misc(const char *, struct nodelist *, const char *, int,
|
static void subevalvar_misc(const char *, struct nodelist *, const char *, int,
|
||||||
int, int);
|
int, int);
|
||||||
static const char *evalvar(const char *, struct nodelist **restrict, int,
|
static const char *evalvar(const char *, struct nodelist **restrict, int,
|
||||||
struct worddest *);
|
struct worddest *);
|
||||||
@ -617,7 +617,7 @@ subevalvar_trim(const char *p, struct nodelist *argbackq, int strloc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static void
|
||||||
subevalvar_misc(const char *p, struct nodelist *argbackq, const char *var, int subtype, int startloc,
|
subevalvar_misc(const char *p, struct nodelist *argbackq, const char *var, int subtype, int startloc,
|
||||||
int varflags)
|
int varflags)
|
||||||
{
|
{
|
||||||
@ -634,7 +634,7 @@ subevalvar_misc(const char *p, struct nodelist *argbackq, const char *var, int s
|
|||||||
setvar(var, startp, 0);
|
setvar(var, startp, 0);
|
||||||
amount = startp - expdest;
|
amount = startp - expdest;
|
||||||
STADJUST(amount, expdest);
|
STADJUST(amount, expdest);
|
||||||
return 1;
|
return;
|
||||||
|
|
||||||
case VSQUESTION:
|
case VSQUESTION:
|
||||||
if (*p != CTLENDVAR) {
|
if (*p != CTLENDVAR) {
|
||||||
@ -643,7 +643,6 @@ subevalvar_misc(const char *p, struct nodelist *argbackq, const char *var, int s
|
|||||||
}
|
}
|
||||||
error("%.*s: parameter %snot set", (int)(p - var - 1),
|
error("%.*s: parameter %snot set", (int)(p - var - 1),
|
||||||
var, (varflags & VSNUL) ? "null or " : "");
|
var, (varflags & VSNUL) ? "null or " : "");
|
||||||
return 0;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
@ -792,12 +791,11 @@ evalvar(const char *p, struct nodelist **restrict argbackq, int flag,
|
|||||||
case VSASSIGN:
|
case VSASSIGN:
|
||||||
case VSQUESTION:
|
case VSQUESTION:
|
||||||
if (!set) {
|
if (!set) {
|
||||||
if (subevalvar_misc(p, *argbackq, var, subtype,
|
subevalvar_misc(p, *argbackq, var, subtype,
|
||||||
startloc, varflags)) {
|
startloc, varflags);
|
||||||
varflags &= ~VSNUL;
|
/* assert(subtype == VSASSIGN); */
|
||||||
goto again;
|
varflags &= ~VSNUL;
|
||||||
}
|
goto again;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user