]> git.sesse.net Git - stockfish/commitdiff
Mark variable as potentially unused
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 5 Nov 2022 08:14:11 +0000 (09:14 +0100)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 5 Nov 2022 08:15:14 +0000 (09:15 +0100)
fixes CI when compiled with -Werror

closes https://github.com/official-stockfish/Stockfish/pull/4221

No functional change

src/position.cpp

index 62e6e2387cb657a58976ce52a4faa9be16db1ff1..5befcaf2cfcbd311034db63fee2a9ce934879d50 100644 (file)
@@ -129,7 +129,7 @@ void Position::init() {
   // Prepare the cuckoo tables
   std::memset(cuckoo, 0, sizeof(cuckoo));
   std::memset(cuckooMove, 0, sizeof(cuckooMove));
-  int count = 0;
+  [[maybe_unused]] int count = 0;
   for (Piece pc : Pieces)
       for (Square s1 = SQ_A1; s1 <= SQ_H8; ++s1)
           for (Square s2 = Square(s1 + 1); s2 <= SQ_H8; ++s2)