]> git.sesse.net Git - stockfish/commitdiff
Fix some Intel compilers warnings
authorMarco Costalba <mcostalba@gmail.com>
Sat, 9 May 2009 10:01:00 +0000 (12:01 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 9 May 2009 10:09:25 +0000 (12:09 +0200)
Also a compile fix due to Makefile missing new
application.cpp file.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/Makefile
src/evaluate.cpp
src/movegen.cpp
src/movepick.h
src/position.cpp
src/san.cpp

index f36de8d8046038750b5fe570cdae1ff03b97fd54..f700a4441e4f55d141645bb494cb1a8ee4cdd36a 100644 (file)
@@ -24,7 +24,7 @@
 
 EXE = stockfish
 
-OBJS = bitboard.o pawns.o material.o endgame.o evaluate.o main.o \
+OBJS = application.o bitboard.o pawns.o material.o endgame.o evaluate.o main.o \
        misc.o move.o movegen.o history.o movepick.o search.o piece.o \
        position.o direction.o tt.o value.o uci.o ucioption.o \
        mersenne.o book.o bitbase.o san.o benchmark.o
index 36a9b10a2f653c0361a351e4e51e25cd8cf8ead5..59b605eca2665f12b40f4a816d71badc9fa6c449 100644 (file)
@@ -571,25 +571,25 @@ namespace {
     ei.egMobility += Sign[us] * EgBonus[Piece][mob];
 
     // Bishop and Knight outposts
-    if (  (Piece != BISHOP && Piece != KNIGHT) // compile time condition
-        || !p.square_is_weak(s, them))
-        return mob;
-
-    // Initial bonus based on square
-    Value v, bonus;
-    v = bonus = OutpostBonus[Piece][relative_square(us, s)];
-
-    // Increase bonus if supported by pawn, especially if the opponent has
-    // no minor piece which can exchange the outpost piece
-    if (v && (p.pawn_attacks(them, s) & p.pawns(us)))
+    if (   (Piece == BISHOP || Piece == KNIGHT) // compile time condition
+        && p.square_is_weak(s, them))
     {
-        bonus += v / 2;
-        if (   p.piece_count(them, KNIGHT) == 0
-            && (SquaresByColorBB[square_color(s)] & p.bishops(them)) == EmptyBoardBB)
-            bonus += v;
+        // Initial bonus based on square
+        Value v, bonus;
+        v = bonus = OutpostBonus[Piece][relative_square(us, s)];
+
+        // Increase bonus if supported by pawn, especially if the opponent has
+        // no minor piece which can exchange the outpost piece
+        if (v && (p.pawn_attacks(them, s) & p.pawns(us)))
+        {
+            bonus += v / 2;
+            if (   p.piece_count(them, KNIGHT) == 0
+                   && (SquaresByColorBB[square_color(s)] & p.bishops(them)) == EmptyBoardBB)
+                bonus += v;
+        }
+        ei.mgValue += Sign[us] * bonus;
+        ei.egValue += Sign[us] * bonus;
     }
-    ei.mgValue += Sign[us] * bonus;
-    ei.egValue += Sign[us] * bonus;
     return mob;
   }
 
index cbb71688d20a6c9eaa11475e4e9aa505ffdc2d18..a783a6251b8b7ca6319d127cb7b1eb8842fa8dbb 100644 (file)
@@ -835,23 +835,23 @@ namespace {
 
     // Direct checks
     b = target & ~dc;
-    if (Piece == KING || !b)
-        return mlist;
-
-    Bitboard checkSqs = pos.piece_attacks<Piece>(ksq) & pos.empty_squares();
-    if (!checkSqs)
-        return mlist;
-
-    while (b)
+    if (Piece != KING || b)
     {
-        Square from = pop_1st_bit(&b);
-        if (   (Piece == QUEEN  && !(QueenPseudoAttacks[from]  & checkSqs))
-            || (Piece == ROOK   && !(RookPseudoAttacks[from]   & checkSqs))
-            || (Piece == BISHOP && !(BishopPseudoAttacks[from] & checkSqs)))
-            continue;
+        Bitboard checkSqs = pos.piece_attacks<Piece>(ksq) & pos.empty_squares();
+        if (!checkSqs)
+            return mlist;
 
-        Bitboard bb = pos.piece_attacks<Piece>(from) & checkSqs;
-        SERIALIZE_MOVES(bb);
+        while (b)
+        {
+            Square from = pop_1st_bit(&b);
+            if (   (Piece == QUEEN  && !(QueenPseudoAttacks[from]  & checkSqs))
+                || (Piece == ROOK   && !(RookPseudoAttacks[from]   & checkSqs))
+                || (Piece == BISHOP && !(BishopPseudoAttacks[from] & checkSqs)))
+                continue;
+
+            Bitboard bb = pos.piece_attacks<Piece>(from) & checkSqs;
+            SERIALIZE_MOVES(bb);
+        }
     }
     return mlist;
   }
index 8e7f6651620957fe9e6c2978b3cb056b591d1165..0ac4bb6cd206799c11504f51194c470daa20101a 100644 (file)
@@ -37,6 +37,8 @@
 struct EvalInfo;
 struct SearchStack;
 
+extern SearchStack EmptySearchStack;
+
 /// MovePicker is a class which is used to pick one legal move at a time from
 /// the current position.  It is initialized with a Position object and a few
 /// moves we have reason to believe are good.  The most important method is
index ce48e33fb6fedd5721b7a890da8665c7cda85046..1c1ceed2199eb73c2d4ab4b2620cb34938cbf10d 100644 (file)
@@ -40,8 +40,6 @@
 //// Variables
 ////
 
-extern SearchStack EmptySearchStack;
-
 int Position::castleRightsMask[64];
 
 Key Position::zobrist[2][8][64];
index d8d051d8a69a4de2c9d142822ff0237c952bec49..3f706b2015f53b1dc7196c7d54a2c6e25dc75a64 100644 (file)
@@ -31,7 +31,6 @@
 #include "movepick.h"
 #include "san.h"
 
-extern SearchStack EmptySearchStack;
 
 ////
 //// Local definitions