From: Marco Costalba Date: Mon, 18 Jan 2010 18:50:45 +0000 (+0100) Subject: Silence some silly MSVC warnings X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=c01af5676913cbb8a522bd080b6d8559c7450f3a;hp=66d5c13a88f041247adf2ba62acdf936a6d6224e;ds=sidebyside Silence some silly MSVC warnings Value is never used un-initialized, but MSVC is not smart enough to detect itself :-( No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 76a4e7a9..43fb7067 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -887,7 +887,7 @@ namespace { Value root_search(Position& pos, SearchStack ss[], RootMoveList& rml, Value alpha, Value beta) { Value oldAlpha = alpha; - Value value; + Value value = -VALUE_INFINITE; CheckInfo ci(pos); // Loop through all the moves in the root move list @@ -1106,7 +1106,7 @@ namespace { Value oldAlpha, value; bool isCheck, mateThreat, singleEvasion, moveIsCheck, captureOrPromotion, dangerous; int moveCount = 0; - Value bestValue = -VALUE_INFINITE; + Value bestValue = value = -VALUE_INFINITE; if (depth < OnePly) return qsearch(pos, ss, alpha, beta, Depth(0), ply, threadID); @@ -1332,7 +1332,7 @@ namespace { bool isCheck, useFutilityPruning, singleEvasion, moveIsCheck, captureOrPromotion, dangerous; bool mateThreat = false; int moveCount = 0; - futilityValue = staticValue = bestValue = -VALUE_INFINITE; + futilityValue = staticValue = bestValue = value = -VALUE_INFINITE; if (depth < OnePly) return qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID); @@ -1810,7 +1810,7 @@ namespace { Position pos = Position(sp->pos); CheckInfo ci(pos); SearchStack* ss = sp->sstack[threadID]; - Value value; + Value value = -VALUE_INFINITE; Move move; bool isCheck = pos.is_check(); bool useFutilityPruning = sp->depth < SelectiveDepth @@ -1952,7 +1952,7 @@ namespace { Position pos = Position(sp->pos); CheckInfo ci(pos); SearchStack* ss = sp->sstack[threadID]; - Value value; + Value value = -VALUE_INFINITE; Move move; while ( sp->alpha < sp->beta