1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 08:13:08 +00:00

Fixed some warnings when using -Weffc++ gcc option

Plus some other icc warnings popped up with new and strictier
compile options.

No functional and speed change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-10-16 13:52:01 +02:00
parent d664773a83
commit 85a7456bd7
6 changed files with 15 additions and 6 deletions

View file

@ -219,14 +219,14 @@ ifeq ($(COMP),icc)
endif
### 3.2 General compiler settings
CXXFLAGS = -g -Wall -Wcast-qual -ansi -fno-exceptions -fno-rtti $(EXTRACXXFLAGS)
CXXFLAGS = -g -Wall -Wcast-qual -fno-exceptions -fno-rtti $(EXTRACXXFLAGS)
ifeq ($(comp),gcc)
CXXFLAGS += -pedantic -Wno-long-long -Wextra
CXXFLAGS += -ansi -pedantic -Wno-long-long -Wextra
endif
ifeq ($(comp),icc)
CXXFLAGS += -wd383,869,981,10187,10188,11505,11503
CXXFLAGS += -wd383,981,10187,10188,11505,11503 -Wcheck -Wabi -Wdeprecated -strict-ansi
endif
ifeq ($(os),osx)

View file

@ -241,7 +241,7 @@ namespace {
template<Color Us>
Score evaluate_passed_pawns(const Position& pos, EvalInfo& ei);
Score apply_weight(Score v, Score weight);
inline Score apply_weight(Score v, Score weight);
Value scale_by_game_phase(const Score& v, Phase ph, ScaleFactor sf);
Score weight_option(const std::string& mgOpt, const std::string& egOpt, Score internalWeight);
void init_safety();

View file

@ -75,6 +75,9 @@ class EndgameFunctions;
class MaterialInfoTable {
MaterialInfoTable(const MaterialInfoTable&);
MaterialInfoTable& operator=(const MaterialInfoTable&);
public:
MaterialInfoTable();
~MaterialInfoTable();

View file

@ -78,6 +78,9 @@ class PawnInfoTable {
enum SideType { KingSide, QueenSide };
PawnInfoTable(const PawnInfoTable&);
PawnInfoTable& operator=(const PawnInfoTable&);
public:
PawnInfoTable();
~PawnInfoTable();

View file

@ -102,6 +102,9 @@ struct TTCluster {
class TranspositionTable {
TranspositionTable(const TranspositionTable&);
TranspositionTable& operator=(const TranspositionTable&);
public:
TranspositionTable();
~TranspositionTable();

View file

@ -150,10 +150,10 @@ template<typename T>
inline T operator- (const T d) { OK(T); return T(-int(d)); }
template<typename T>
inline void operator++ (T& d, int) { OK(T); d = T(int(d) + 1); }
inline T operator++ (T& d, int) { OK(T); d = T(int(d) + 1); return d; }
template<typename T>
inline void operator-- (T& d, int) { OK(T); d = T(int(d) - 1); }
inline T operator-- (T& d, int) { OK(T); d = T(int(d) - 1); return d; }
template<typename T>
inline void operator+= (T& d1, const T d2) { OK(T); d1 = d1 + d2; }