mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 23:56:23 +08:00
A useless assignment found by Clang’s static analyzer
Warning is: "Value stored to 'xxx' is never read" and it is raised in SpNode case. No functional change.
This commit is contained in:
@@ -502,7 +502,6 @@ namespace {
|
|||||||
|
|
||||||
// Step 1. Initialize node
|
// Step 1. Initialize node
|
||||||
Thread* thisThread = pos.this_thread();
|
Thread* thisThread = pos.this_thread();
|
||||||
moveCount = quietCount = 0;
|
|
||||||
inCheck = pos.checkers();
|
inCheck = pos.checkers();
|
||||||
|
|
||||||
if (SpNode)
|
if (SpNode)
|
||||||
@@ -520,6 +519,7 @@ namespace {
|
|||||||
goto moves_loop;
|
goto moves_loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
moveCount = quietCount = 0;
|
||||||
bestValue = -VALUE_INFINITE;
|
bestValue = -VALUE_INFINITE;
|
||||||
ss->currentMove = threatMove = (ss+1)->excludedMove = bestMove = MOVE_NONE;
|
ss->currentMove = threatMove = (ss+1)->excludedMove = bestMove = MOVE_NONE;
|
||||||
ss->ply = (ss-1)->ply + 1;
|
ss->ply = (ss-1)->ply + 1;
|
||||||
@@ -1243,8 +1243,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Detect non-capture evasions that are candidate to be pruned
|
// Detect non-capture evasions that are candidate to be pruned
|
||||||
evasionPrunable = !PvNode
|
evasionPrunable = InCheck
|
||||||
&& InCheck
|
|
||||||
&& bestValue > VALUE_MATED_IN_MAX_PLY
|
&& bestValue > VALUE_MATED_IN_MAX_PLY
|
||||||
&& !pos.is_capture(move)
|
&& !pos.is_capture(move)
|
||||||
&& !pos.can_castle(pos.side_to_move());
|
&& !pos.can_castle(pos.side_to_move());
|
||||||
|
|||||||
Reference in New Issue
Block a user