Externals/expr: Resolve -Wshadow warning
We already made changes to this library, so we can also resolve the lone shadowing warning within it.
This commit is contained in:
parent
cdf4193e67
commit
5450b64951
|
@ -826,14 +826,14 @@ static struct expr *expr_create(const char *s, size_t len,
|
||||||
vec_push(&es, expr_const(num));
|
vec_push(&es, expr_const(num));
|
||||||
paren_next = EXPR_PAREN_FORBIDDEN;
|
paren_next = EXPR_PAREN_FORBIDDEN;
|
||||||
} else if (n > 1 && *tok == '"') {
|
} else if (n > 1 && *tok == '"') {
|
||||||
char *s = (char *)calloc(1, n - 1);
|
char *str = (char *)calloc(1, n - 1);
|
||||||
if (s == NULL) {
|
if (str == NULL) {
|
||||||
goto cleanup; /* allocation failed */
|
goto cleanup; /* allocation failed */
|
||||||
}
|
}
|
||||||
strncpy(s, tok + 1, n - 2);
|
strncpy(str, tok + 1, n - 2);
|
||||||
struct expr e = expr_init();
|
struct expr e = expr_init();
|
||||||
e.type = OP_STRING;
|
e.type = OP_STRING;
|
||||||
e.param.str.s = s;
|
e.param.str.s = str;
|
||||||
vec_push(&es, e);
|
vec_push(&es, e);
|
||||||
paren_next = EXPR_PAREN_FORBIDDEN;
|
paren_next = EXPR_PAREN_FORBIDDEN;
|
||||||
} else if (expr_op(tok, n, -1) != OP_UNKNOWN) {
|
} else if (expr_op(tok, n, -1) != OP_UNKNOWN) {
|
||||||
|
|
Loading…
Reference in New Issue