]> git.sesse.net Git - stockfish/commitdiff
Fix silly MSVC warning
authorMarco Costalba <mcostalba@gmail.com>
Sun, 17 Jan 2010 12:54:52 +0000 (13:54 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 17 Jan 2010 12:54:52 +0000 (13:54 +0100)
MSVC raises an "use of partially uninitialized variable" for futilityValue
and staticValue but this is not rue becasue when !isCheck variables
are never used, anyhow silence the warning.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index ac90531f8c618a44c983cbbc3d4454f71163a97f..c7d8d792fee4bb231a559e506ba501c7410c2177 100644 (file)
@@ -1328,11 +1328,11 @@ namespace {
     const TTEntry* tte;
     Move ttMove, move;
     Depth ext, newDepth;
-    Value staticValue, nullValue, value, futilityValue, futilityValueScaled;
+    Value bestValue, staticValue, nullValue, value, futilityValue, futilityValueScaled;
     bool isCheck, useFutilityPruning, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
     bool mateThreat = false;
     int moveCount = 0;
-    Value bestValue = -VALUE_INFINITE;
+    futilityValue = staticValue = bestValue = -VALUE_INFINITE;
 
     if (depth < OnePly)
         return qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);