Fix variable shadowing
This commit is contained in:
parent
31649edc77
commit
952b55fbdb
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ PREFIX=/usr/local
|
||||
SYSCONFDIR=/etc
|
||||
CFLAGS=-std=c11 -Werror -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -fPIC -flto=auto -fvisibility=hidden \
|
||||
-fsanitize=signed-integer-overflow -fno-sanitize-recover
|
||||
CWARN=-Wall -Wextra -Wno-format
|
||||
CWARN=-Wall -Wextra -Wno-format -Wshadow
|
||||
# -Wpedantic -Wsign-conversion -Wtype-limits -Wunused-result -Wnull-dereference \
|
||||
# -Waggregate-return -Walloc-zero -Walloca -Warith-conversion -Wcast-align -Wcast-align=strict \
|
||||
# -Wdangling-else -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches \
|
||||
|
2
match.c
2
match.c
@ -97,7 +97,7 @@ static match_t *clone_match(match_t *m)
|
||||
for (int i = 0; m->children[i]; i++) {
|
||||
if (nchildren+1 >= child_cap) {
|
||||
ret->children = grow(ret->children, child_cap += 5);
|
||||
for (size_t i = nchildren; i < child_cap; i++) ret->children[i] = NULL;
|
||||
for (size_t j = nchildren; j < child_cap; j++) ret->children[j] = NULL;
|
||||
}
|
||||
ret->children[nchildren++] = clone_match(m->children[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user