]> git.sesse.net Git - stockfish/commitdiff
Silence a warning under MSVC
authorMarco Costalba <mcostalba@gmail.com>
Sun, 1 Feb 2015 09:40:22 +0000 (10:40 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 1 Feb 2015 09:40:22 +0000 (10:40 +0100)
warning C4100: 'ci' : unreferenced formal parameter

It is a silly and wrong one, but just silent it.

No functional change.

src/movegen.cpp

index cf65cd62889103c2b89cdd9c437b226ff05660fe..f800fdc7c7a64c422688f6944785ce1644b07be3 100644 (file)
@@ -61,7 +61,7 @@ namespace {
 
     (moveList++)->move = m;
 
 
     (moveList++)->move = m;
 
-    return moveList;
+    return (void)ci, moveList; // Silence a warning under MSVC
   }
 
 
   }
 
 
@@ -82,10 +82,8 @@ namespace {
     // that's not already included in the queen promotion.
     if (Type == QUIET_CHECKS && (StepAttacksBB[W_KNIGHT][to] & ci->ksq))
         (moveList++)->move = make<PROMOTION>(to - Delta, to, KNIGHT);
     // that's not already included in the queen promotion.
     if (Type == QUIET_CHECKS && (StepAttacksBB[W_KNIGHT][to] & ci->ksq))
         (moveList++)->move = make<PROMOTION>(to - Delta, to, KNIGHT);
-    else
-        (void)ci; // Silence a warning under MSVC
 
 
-    return moveList;
+    return (void)ci, moveList; // Silence a warning under MSVC
   }
 
 
   }