mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Fix issues detected by Coverity Scan
Most of Coverity Scan reports are false positives, but in rare cases we have confirmed (very small) issues. No functional change.
This commit is contained in:
@@ -283,6 +283,8 @@ void MovePicker::generate_next_stage() {
|
|||||||
|
|
||||||
case EVASION: case QSEARCH_0: case QSEARCH_1: case PROBCUT: case RECAPTURE:
|
case EVASION: case QSEARCH_0: case QSEARCH_1: case PROBCUT: case RECAPTURE:
|
||||||
stage = STOP;
|
stage = STOP;
|
||||||
|
/* Fall through */
|
||||||
|
|
||||||
case STOP:
|
case STOP:
|
||||||
end = cur + 1; // Avoid another next_phase() call
|
end = cur + 1; // Avoid another next_phase() call
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ const string move_to_san(Position& pos, Move m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!others)
|
if (!others)
|
||||||
{ /* disambiguation is not needed */ }
|
{ /* Disambiguation is not needed */ }
|
||||||
|
|
||||||
else if (!(others & file_bb(from)))
|
else if (!(others & file_bb(from)))
|
||||||
san += to_char(file_of(from));
|
san += to_char(file_of(from));
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ struct SplitPoint {
|
|||||||
|
|
||||||
struct ThreadBase {
|
struct ThreadBase {
|
||||||
|
|
||||||
ThreadBase() : exit(false) {}
|
ThreadBase() : handle(NativeHandle()), exit(false) {}
|
||||||
virtual ~ThreadBase() {}
|
virtual ~ThreadBase() {}
|
||||||
virtual void idle_loop() = 0;
|
virtual void idle_loop() = 0;
|
||||||
void notify_one();
|
void notify_one();
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ void UCI::loop(int argc, char* argv[]) {
|
|||||||
<< "position key: " << setw(16) << pos.key()
|
<< "position key: " << setw(16) << pos.key()
|
||||||
<< "\nmaterial key: " << setw(16) << pos.material_key()
|
<< "\nmaterial key: " << setw(16) << pos.material_key()
|
||||||
<< "\npawn key: " << setw(16) << pos.pawn_key()
|
<< "\npawn key: " << setw(16) << pos.pawn_key()
|
||||||
<< dec << sync_endl;
|
<< dec << nouppercase << setfill(' ') << sync_endl;
|
||||||
|
|
||||||
else if (token == "uci")
|
else if (token == "uci")
|
||||||
sync_cout << "id name " << engine_info(true)
|
sync_cout << "id name " << engine_info(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user