]> git.sesse.net Git - stockfish/commitdiff
Fix Intel compiler warnings
authorMarco Costalba <mcostalba@gmail.com>
Sun, 27 Apr 2014 10:02:36 +0000 (12:02 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 27 Apr 2014 10:02:36 +0000 (12:02 +0200)
Fallout from previous patch: Intel compiler
is very noisy.

No functional change.

src/evaluate.cpp
src/search.cpp
src/timeman.cpp
src/timeman.h

index e1a000c6323d081a2458285083c2c38a4b0910b8..5c66202aa662416d9b4a4070e0e04214f16e69ed 100644 (file)
@@ -583,8 +583,8 @@ namespace {
 
         assert(pos.pawn_passed(Us, s));
 
-        Rank r = relative_rank(Us, s) - RANK_2;
-        Rank rr = r * (r - 1);
+        int r = relative_rank(Us, s) - RANK_2;
+        int rr = r * (r - 1);
 
         // Base bonus based on rank
         Value mbonus = Value(17 * rr), ebonus = Value(7 * (rr + r + 1));
@@ -599,7 +599,7 @@ namespace {
 
             // If blockSq is not the queening square then consider also a second push
             if (relative_rank(Us, blockSq) != RANK_8)
-                ebonus -= rr * square_distance(pos.king_square(Us), blockSq + pawn_push(Us));
+                ebonus -= square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr;
 
             // If the pawn is free to advance, then increase the bonus
             if (pos.empty(blockSq))
@@ -920,7 +920,7 @@ namespace Eval {
 
     for (int t = 0, i = 1; i < 100; ++i)
     {
-        t = std::min(Peak, std::min(0.4 * i * i, t + MaxSlope));
+        t = int(std::min(Peak, std::min(0.4 * i * i, t + MaxSlope)));
 
         KingDanger[1][i] = apply_weight(make_score(t, 0), Weights[KingDangerUs]);
         KingDanger[0][i] = apply_weight(make_score(t, 0), Weights[KingDangerThem]);
index d0929d5dfb3f34a019979a2825c8014d56b6a6a5..2f7ed7be09127428341fc7cb0564bb1ff67ba8f6 100644 (file)
@@ -146,8 +146,8 @@ void Search::init() {
   // Init futility move count array
   for (d = 0; d < 32; ++d)
   {
-      FutilityMoveCounts[0][d] = 2.4 + 0.222 * pow(d + 0.00, 1.8);
-      FutilityMoveCounts[1][d] = 3.0 + 0.300 * pow(d + 0.98, 1.8);
+      FutilityMoveCounts[0][d] = int(2.4 + 0.222 * pow(d + 0.00, 1.8));
+      FutilityMoveCounts[1][d] = int(3.0 + 0.300 * pow(d + 0.98, 1.8));
   }
 }
 
index 34858f3a0459a86fc380eb8e047895c7eaa950d6..2092b7299ed1c3b78ac9b53178bf5e61e7672d8d 100644 (file)
@@ -63,7 +63,7 @@ namespace {
     double ratio1 = (TMaxRatio * thisMoveImportance) / (TMaxRatio * thisMoveImportance + otherMovesImportance);
     double ratio2 = (thisMoveImportance + TStealRatio * otherMovesImportance) / (thisMoveImportance + otherMovesImportance);
 
-    return floor(myTime * std::min(ratio1, ratio2));
+    return int(floor(myTime * std::min(ratio1, ratio2)));
   }
 
 } // namespace
index 83da9c5ecdc4820be3c5a5136d61922cbe0ba582..a15551af567461a43e55d202122f936513be8a8d 100644 (file)
@@ -27,7 +27,7 @@ class TimeManager {
 public:
   void init(const Search::LimitsType& limits, int currentPly, Color us);
   void pv_instability(double bestMoveChanges) { unstablePvFactor = 1 + bestMoveChanges; }
-  int available_time() const { return optimumSearchTime * unstablePvFactor * 0.71; }
+  int available_time() const { return int(optimumSearchTime * unstablePvFactor * 0.71); }
   int maximum_time() const { return maximumSearchTime; }
 
 private: