This is the world's fussiest compiler with +w1
Warnings reported by Richard Lloyd.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
qsq = relative_square(Us, make_square(square_file(s), RANK_8));
d = square_distance(s, qsq)
- square_distance(theirKingSq, qsq)
qsq = relative_square(Us, make_square(square_file(s), RANK_8));
d = square_distance(s, qsq)
- square_distance(theirKingSq, qsq)
- + (Us != pos.side_to_move());
+ + int(Us != pos.side_to_move());
// Split positives vs non-positives
do {
// Split positives vs non-positives
do {
- while ((++p)->score > 0);
+ while ((++p)->score > 0) {}
- while (--d != p && d->score <= 0);
+ while (--d != p && d->score <= 0) {}
searchTT = ttMoves[0].move = MOVE_NONE;
}
searchTT = ttMoves[0].move = MOVE_NONE;
}
- phasePtr += !searchTT - 1;
+ phasePtr += int(!searchTT) - 1;
const Position& pos;
const History& H;
const Position& pos;
const History& H;
MoveStack ttMoves[2], killers[2];
int badCaptureThreshold, phase;
const uint8_t* phasePtr;
MoveStack *curMove, *lastMove, *lastGoodNonCapture, *lastBadCapture;
MoveStack ttMoves[2], killers[2];
int badCaptureThreshold, phase;
const uint8_t* phasePtr;
MoveStack *curMove, *lastMove, *lastGoodNonCapture, *lastBadCapture;
MoveStack moves[256], badCaptures[64];
};
MoveStack moves[256], badCaptures[64];
};
Key key;
Bitboard passedPawns;
Bitboard pawnAttacks[2];
Key key;
Bitboard passedPawns;
Bitboard pawnAttacks[2];
Score value;
int16_t ksStormValue[2], qsStormValue[2];
uint8_t halfOpenFiles[2];
Score value;
int16_t ksStormValue[2], qsStormValue[2];
uint8_t halfOpenFiles[2];
uint8_t kingShelters[2];
};
uint8_t kingShelters[2];
};
char piece_type_to_char(PieceType pt, bool upcase) {
char piece_type_to_char(PieceType pt, bool upcase) {
- return PieceChars[pt + upcase * 7];
+ return PieceChars[pt + int(upcase) * 7];
}
PieceType piece_type_from_char(char c) {
}
PieceType piece_type_from_char(char c) {
CheckInfo(const Position&);
CheckInfo(const Position&);
Bitboard dcCandidates;
Bitboard checkSq[8];
Bitboard dcCandidates;
Bitboard checkSq[8];
};
/// Castle rights, encoded as bit fields
};
/// Castle rights, encoded as bit fields
Score value;
Value npMaterial[2];
Score value;
Value npMaterial[2];
Bitboard checkersBB;
StateInfo* previous;
};
Bitboard checkersBB;
StateInfo* previous;
};
int gamePly;
Key history[MaxGameLength];
int castleRightsMask[64];
int gamePly;
Key history[MaxGameLength];
int castleRightsMask[64];
- File initialKFile, initialKRFile, initialQRFile;
+ File initialKFile, initialKRFile, initialQRFile;
StateInfo* st;
// Static variables
StateInfo* st;
// Static variables
return pieceCount[c][pt];
}
return pieceCount[c][pt];
}
-inline Square Position::piece_list(Color c, PieceType pt, int index) const {
- return pieceList[c][pt][index];
+inline Square Position::piece_list(Color c, PieceType pt, int idx) const {
+ return pieceList[c][pt][idx];
}
inline const Square* Position::piece_list_begin(Color c, PieceType pt) const {
}
inline const Square* Position::piece_list_begin(Color c, PieceType pt) const {
}
// Wait until the thread has finished launching and is gone to sleep
}
// Wait until the thread has finished launching and is gone to sleep
- while (threads[i].state != THREAD_SLEEPING);
+ while (threads[i].state != THREAD_SLEEPING) {}
- for (sp = threads[threadID].splitPoint; sp && !sp->stopRequest; sp = sp->parent);
+ for (sp = threads[threadID].splitPoint; sp && !sp->stopRequest; sp = sp->parent) {}
// Const data after splitPoint has been setup
SplitPoint* parent;
const Position* pos;
// Const data after splitPoint has been setup
SplitPoint* parent;
const Position* pos;
+ bool pvNode, mateThreat;
Value beta;
int ply, master, slaves[MAX_THREADS];
SearchStack sstack[MAX_THREADS][PLY_MAX_PLUS_2];
Value beta;
int ply, master, slaves[MAX_THREADS];
SearchStack sstack[MAX_THREADS][PLY_MAX_PLUS_2];
VALUE_TYPE_EV_UP = VALUE_TYPE_EVAL | VALUE_TYPE_UPPER,
VALUE_TYPE_EV_LO = VALUE_TYPE_EVAL | VALUE_TYPE_LOWER,
VALUE_TYPE_EV_UP = VALUE_TYPE_EVAL | VALUE_TYPE_UPPER,
VALUE_TYPE_EV_LO = VALUE_TYPE_EVAL | VALUE_TYPE_LOWER,
- VALUE_TYPE_NS_LO = VALUE_TYPE_NULL | VALUE_TYPE_LOWER,
+ VALUE_TYPE_NS_LO = VALUE_TYPE_NULL | VALUE_TYPE_LOWER