Skip to content

Commit a817a9b

Browse files
committed
fix a shadow warning
1 parent 03882f2 commit a817a9b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/apps/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ifeq ($(UNAME),Darwin)
77
endif
88
CC?=gcc
99
STRIP=strip
10-
CFLAGS=-std=gnu99 -O2 -Wall -DTB_NO_THREADS -I..
10+
CFLAGS=-std=gnu99 -O2 -Wall -Wshadow -DTB_NO_THREADS -I..
1111

1212
main: $(TARGET)
1313

src/tbprobe.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Copyright (c) 2013-2018 Ronald de Man
33
Copyright (c) 2015 basil00
4-
Modifications Copyright (c) 2016-2022 by Jon Dart
4+
Modifications Copyright (c) 2016-2023 by Jon Dart
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal
@@ -1974,12 +1974,12 @@ int probe_wdl(Pos *pos, int *success)
19741974
// Now handle the stalemate case.
19751975
if (bestEp > -3 && v == 0) {
19761976
TbMove moves[TB_MAX_MOVES];
1977-
TbMove *end = gen_moves(pos, moves);
1977+
TbMove *end2 = gen_moves(pos, moves);
19781978
// Check for stalemate in the position with ep captures.
1979-
for (m = moves; m < end; m++) {
1979+
for (m = moves; m < end2; m++) {
19801980
if (!is_en_passant(pos,*m) && legal_move(pos, *m)) break;
19811981
}
1982-
if (m == end && !is_check(pos)) {
1982+
if (m == end2 && !is_check(pos)) {
19831983
// stalemate score from tb (w/o e.p.), but an en-passant capture
19841984
// is possible.
19851985
*success = 2;

0 commit comments

Comments
 (0)