From e3b03278129e4d7f130826aef209668b3268aa94 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Fri, 2 Nov 2012 11:41:49 +0100 Subject: [PATCH] Fix a warning under MSVC Compiler complies that 'cnt' is initialized but unused (in !CheckThreeFold case). Moving the definition of 'cnt'out of the loop seems to do the trick. No functional change. --- src/position.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/position.cpp b/src/position.cpp index 50bb8e18..004d6994 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1448,13 +1448,13 @@ bool Position::is_draw() const { if (CheckRepetition) { - int i = 4, e = std::min(st->rule50, st->pliesFromNull); + int i = 4, e = std::min(st->rule50, st->pliesFromNull), cnt; if (i <= e) { StateInfo* stp = st->previous->previous; - for (int cnt = 0; i <= e; i += 2) + for (cnt = 0; i <= e; i += 2) { stp = stp->previous->previous; -- 2.39.2