mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Fix some warnings under +w1 HP-UX compile
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>
This commit is contained in:
parent
e81108a855
commit
a4a0ffce71
10 changed files with 16 additions and 17 deletions
|
@ -961,7 +961,7 @@ namespace {
|
|||
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());
|
||||
|
||||
if (d < 0)
|
||||
{
|
||||
|
|
|
@ -101,11 +101,11 @@ inline void sort_moves(T* firstMove, T* lastMove, T** lastPositive)
|
|||
|
||||
// Split positives vs non-positives
|
||||
do {
|
||||
while ((++p)->score > 0);
|
||||
while ((++p)->score > 0) {}
|
||||
|
||||
if (p != d)
|
||||
{
|
||||
while (--d != p && d->score <= 0);
|
||||
while (--d != p && d->score <= 0) {}
|
||||
|
||||
tmp = *p;
|
||||
*p = *d;
|
||||
|
|
|
@ -111,7 +111,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d,
|
|||
searchTT = ttMoves[0].move = MOVE_NONE;
|
||||
}
|
||||
|
||||
phasePtr += !searchTT - 1;
|
||||
phasePtr += int(!searchTT) - 1;
|
||||
go_next_phase();
|
||||
}
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@ private:
|
|||
|
||||
const Position& pos;
|
||||
const History& H;
|
||||
Bitboard pinned;
|
||||
MoveStack ttMoves[2], killers[2];
|
||||
int badCaptureThreshold, phase;
|
||||
const uint8_t* phasePtr;
|
||||
MoveStack *curMove, *lastMove, *lastGoodNonCapture, *lastBadCapture;
|
||||
Bitboard pinned;
|
||||
MoveStack moves[256], badCaptures[64];
|
||||
};
|
||||
|
||||
|
|
|
@ -64,10 +64,10 @@ private:
|
|||
Key key;
|
||||
Bitboard passedPawns;
|
||||
Bitboard pawnAttacks[2];
|
||||
Square kingSquares[2];
|
||||
Score value;
|
||||
int16_t ksStormValue[2], qsStormValue[2];
|
||||
uint8_t halfOpenFiles[2];
|
||||
Square kingSquares[2];
|
||||
uint8_t kingShelters[2];
|
||||
};
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ static const string PieceChars(" pnbrqk PNBRQK");
|
|||
|
||||
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) {
|
||||
|
|
|
@ -70,9 +70,9 @@ struct CheckInfo {
|
|||
|
||||
CheckInfo(const Position&);
|
||||
|
||||
Square ksq;
|
||||
Bitboard dcCandidates;
|
||||
Bitboard checkSq[8];
|
||||
Square ksq;
|
||||
};
|
||||
|
||||
/// Castle rights, encoded as bit fields
|
||||
|
@ -105,8 +105,8 @@ struct StateInfo {
|
|||
Score value;
|
||||
Value npMaterial[2];
|
||||
|
||||
Key key;
|
||||
PieceType capture;
|
||||
Key key;
|
||||
Bitboard checkersBB;
|
||||
StateInfo* previous;
|
||||
};
|
||||
|
@ -329,8 +329,8 @@ private:
|
|||
int gamePly;
|
||||
Key history[MaxGameLength];
|
||||
int castleRightsMask[64];
|
||||
File initialKFile, initialKRFile, initialQRFile;
|
||||
StateInfo startState;
|
||||
File initialKFile, initialKRFile, initialQRFile;
|
||||
StateInfo* st;
|
||||
|
||||
// Static variables
|
||||
|
@ -412,8 +412,8 @@ inline int Position::piece_count(Color c, PieceType pt) const {
|
|||
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 {
|
||||
|
|
|
@ -2774,7 +2774,7 @@ namespace {
|
|||
}
|
||||
|
||||
// Wait until the thread has finished launching and is gone to sleep
|
||||
while (threads[i].state != THREAD_SLEEPING);
|
||||
while (threads[i].state != THREAD_SLEEPING) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2815,7 +2815,7 @@ namespace {
|
|||
|
||||
SplitPoint* sp;
|
||||
|
||||
for (sp = threads[threadID].splitPoint; sp && !sp->stopRequest; sp = sp->parent);
|
||||
for (sp = threads[threadID].splitPoint; sp && !sp->stopRequest; sp = sp->parent) {}
|
||||
return sp != NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,9 +51,8 @@ struct SplitPoint {
|
|||
// Const data after splitPoint has been setup
|
||||
SplitPoint* parent;
|
||||
const Position* pos;
|
||||
bool pvNode;
|
||||
Depth depth;
|
||||
bool mateThreat;
|
||||
bool pvNode, mateThreat;
|
||||
Value beta;
|
||||
int ply, master, slaves[MAX_THREADS];
|
||||
SearchStack sstack[MAX_THREADS][PLY_MAX_PLUS_2];
|
||||
|
|
|
@ -42,7 +42,7 @@ enum ValueType {
|
|||
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue