]> git.sesse.net Git - stockfish/commitdiff
Fix two gcc warnings in san.cpp
authorMarco Costalba <mcostalba@gmail.com>
Sat, 6 Dec 2008 11:01:16 +0000 (12:01 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 6 Dec 2008 11:32:11 +0000 (12:32 +0100)
One good, the other silly.

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

index a0ff4cdd86398c7638070d6f4625eefbb41b5e1a..222a10431be9a74f5f77223376739e87172de0a5 100644 (file)
@@ -223,7 +223,7 @@ Move move_from_san(const Position& pos, const std::string& movestr) {
               toRank = rank_from_char(c);
               state = (i < movestr.length() - 1) ? PROMOTION_OR_CHECK : END;
           }
               toRank = rank_from_char(c);
               state = (i < movestr.length() - 1) ? PROMOTION_OR_CHECK : END;
           }
-          else if (state == TO_FILE && fromRank == FILE_NONE)
+          else if (state == TO_FILE && fromRank == RANK_NONE)
           {
               // It's a disambiguation rank instead of a file
               fromRank = rank_from_char(c);
           {
               // It's a disambiguation rank instead of a file
               fromRank = rank_from_char(c);
@@ -263,7 +263,7 @@ Move move_from_san(const Position& pos, const std::string& movestr) {
       return MOVE_NONE;
 
   // Look for a matching move
       return MOVE_NONE;
 
   // Look for a matching move
-  Move m, move;
+  Move m, move = MOVE_NONE;
   to = make_square(toFile, toRank);
   int matches = 0;
 
   to = make_square(toFile, toRank);
   int matches = 0;