summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-12-16 05:10:06 +0100
committerGitHub <noreply@github.com>2023-12-16 05:10:06 +0100
commit3ee44bc5656870607f2328a295b717fc0eb15a67 (patch)
treec46b217691be4f518dfd736b7c5413d8bd73e039
parent1daaaf8c267b0bf53cc364fd3e67e177c27c8765 (diff)
parent5450b64951bbd4b4e29c5ad86cba0a94503b7fc0 (diff)
Merge pull request #12416 from lioncash/expr
Externals/expr: Resolve -Wshadow warning
-rw-r--r--Externals/expr/include/expr.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Externals/expr/include/expr.h b/Externals/expr/include/expr.h
index ac15ddef73..c62f68f28d 100644
--- a/Externals/expr/include/expr.h
+++ b/Externals/expr/include/expr.h
@@ -826,14 +826,14 @@ static struct expr *expr_create(const char *s, size_t len,
vec_push(&es, expr_const(num));
paren_next = EXPR_PAREN_FORBIDDEN;
} else if (n > 1 && *tok == '"') {
- char *s = (char *)calloc(1, n - 1);
- if (s == NULL) {
+ char *str = (char *)calloc(1, n - 1);
+ if (str == NULL) {
goto cleanup; /* allocation failed */
}
- strncpy(s, tok + 1, n - 2);
+ strncpy(str, tok + 1, n - 2);
struct expr e = expr_init();
e.type = OP_STRING;
- e.param.str.s = s;
+ e.param.str.s = str;
vec_push(&es, e);
paren_next = EXPR_PAREN_FORBIDDEN;
} else if (expr_op(tok, n, -1) != OP_UNKNOWN) {