]> git.sesse.net Git - stockfish/commitdiff
Silence a good bunch of Intel warnings
authorMarco Costalba <mcostalba@gmail.com>
Sun, 15 Mar 2009 17:07:28 +0000 (18:07 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 15 Mar 2009 17:19:08 +0000 (18:19 +0100)
Note that some pawns and material info has been switched
to int from int8_t.

This is a waste of space but it is not clear if we have a
faster or slower code (or nothing changed), some test should be
needed.

Few warnings still are alive.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/bitbase.cpp
src/evaluate.cpp
src/material.h
src/position.cpp
src/search.cpp
src/tt.cpp

index 36e93eead78eb6f602d5807e6a44513fa0840b27..75376d33b9874c83a875b8e821440b46d2a1026f 100644 (file)
@@ -89,7 +89,7 @@ void generate_kpk_bitbase(uint8_t bitbase[]) {
   int i, j, b;
   for(i = 0; i < 24576; i++) {
     for(b = 0, j = 0; j < 8; b |= (compress_result(Bitbase[8*i+j]) << j), j++);
-    bitbase[i] = b;
+    bitbase[i] = (uint8_t)b;
   }
 
   // Release allocated memory:
index f654b515ef361b2cd7fe11e54ec1c1a05186af34..c22b591380433388fe37220dec5aa2607bbb2cb6 100644 (file)
@@ -490,7 +490,7 @@ void init_eval(int threads) {
   }
 
   for (Bitboard b = 0ULL; b < 256ULL; b++)
-      BitCount8Bit[b] = count_1s(b);
+      BitCount8Bit[b] = (uint8_t)count_1s(b);
 }
 
 
index 7ba3b7de00c4760fe16fa51df00d3d1bef7d4fd3..bd4183154113d7b48b3fc95301304c41306ca2ab 100644 (file)
@@ -65,7 +65,7 @@ private:
   uint8_t factor[2];
   EndgameEvaluationFunctionBase* evaluationFunction;
   EndgameScalingFunctionBase* scalingFunction[2];
-  uint8_t spaceWeight;
+  int spaceWeight;
 };
 
 
index 45be5df3203b26a0c4fe5ffccb25468033692ba0..b8f7807b68aa5eb225a5b3aabcee248e6c5f06fb 100644 (file)
@@ -1854,15 +1854,14 @@ Value Position::compute_value() const {
 Value Position::compute_non_pawn_material(Color c) const {
 
   Value result = Value(0);
-  Square s;
 
   for (PieceType pt = KNIGHT; pt <= QUEEN; pt++)
   {
       Bitboard b = pieces_of_color_and_type(c, pt);
-      while(b)
+      while (b)
       {
-          s = pop_1st_bit(&b);
-          assert(piece_on(s) == piece_of_color_and_type(c, pt));
+          assert(piece_on(first_1(b)) == piece_of_color_and_type(c, pt));
+          pop_1st_bit(&b);
           result += piece_value_midgame(pt);
       }
   }
index 549f19e211caecc575a10eb6fda327a6986e1d06..03c566ebf29970f77f37d20991794314558ea650 100644 (file)
@@ -193,7 +193,6 @@ namespace {
 
   // Iteration counters
   int Iteration;
-  bool LastIterations;
   BetaCounterType BetaCounter;
 
   // Scores and number of times the best move changed for each iteration:
@@ -207,7 +206,7 @@ namespace {
   int SearchStartTime;
   int MaxNodes, MaxDepth;
   int MaxSearchTime, AbsoluteMaxSearchTime, ExtraSearchTime;
-  Move BestRootMove, PonderMove, EasyMove;
+  Move EasyMove;
   int RootMoveNumber;
   bool InfiniteSearch;
   bool PonderSearch;
@@ -369,8 +368,6 @@ void think(const Position &pos, bool infinite, bool ponder, int side_to_move,
   // Initialize global search variables
   Idle = false;
   SearchStartTime = get_system_time();
-  BestRootMove = MOVE_NONE;
-  PonderMove = MOVE_NONE;
   EasyMove = MOVE_NONE;
   for (int i = 0; i < THREAD_MAX; i++)
   {
@@ -661,7 +658,6 @@ namespace {
     ValueByIteration[0] = Value(0);
     ValueByIteration[1] = rml.get_move_score(0);
     Iteration = 1;
-    LastIterations = false;
 
     EasyMove = rml.scan_for_easy_move();
 
@@ -716,9 +712,6 @@ namespace {
                 ExtraSearchTime = BestMoveChangesByIteration[Iteration]   * (MaxSearchTime / 2)
                                 + BestMoveChangesByIteration[Iteration-1] * (MaxSearchTime / 3);
 
-            // Try to guess if the current iteration is the last one or the last two
-            LastIterations = (current_search_time() > ((MaxSearchTime + ExtraSearchTime)*58) / 128);
-
             // Stop search if most of MaxSearchTime is consumed at the end of the
             // iteration.  We probably don't have enough time to search the first
             // move at the next iteration anyway.
index 8911e171eea429cabcb6be99ce202ef09a768bd5..185410e6aae307c07a211364f21800973102e202 100644 (file)
@@ -207,4 +207,4 @@ TTEntry::TTEntry() {
 TTEntry::TTEntry(Key k, Value v, ValueType t, Depth d, Move m,
                  int generation) :
   key_ (k), data((m & 0x7FFFF) | (t << 20) | (generation << 23)),
-  value_(v), depth_(int16_t(d)) {}
+  value_(int16_t(v)), depth_(int16_t(d)) {}