]> git.sesse.net Git - stockfish/commitdiff
Fix a warning under HP-UX ANSI C++
authorMarco Costalba <mcostalba@gmail.com>
Fri, 9 Apr 2010 06:05:32 +0000 (07:05 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 9 Apr 2010 06:54:00 +0000 (07:54 +0100)
Reported warning is:

warning #2514-D: pointless comparison of unsigned
                 integer with a negative constant

Spotted by Richard Lloyd.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/depth.h
src/search.cpp

index 92ce6e22a0e6001ad26f1c86fca0f81b2feaccbb..05008e05c4fbfa04d405e3e542a69261f2fb5772 100644 (file)
@@ -27,7 +27,8 @@
 
 enum Depth {
   DEPTH_ZERO = 0,
-  DEPTH_MAX = 200  // 100 * OnePly;
+  DEPTH_MAX = 200, // 100 * OnePly;
+  DEPTH_ENSURE_SIGNED = -1
 };
 
 
index 5ea75fecfbd98d40cb084f20600f77612b6a891c..fd5687ea9714ab625bbc8a6cf106003ab293bb34 100644 (file)
@@ -1666,7 +1666,7 @@ namespace {
         alpha = bestValue;
 
     // If we are near beta then try to get a cutoff pushing checks a bit further
-    bool deepChecks = depth == -OnePly && staticValue >= beta - PawnValueMidgame / 8;
+    bool deepChecks = (depth == -OnePly && staticValue >= beta - PawnValueMidgame / 8);
 
     // Initialize a MovePicker object for the current position, and prepare
     // to search the moves. Because the depth is <= 0 here, only captures,