Skip to content

Commit

Permalink
Fix an obscure gcc warning
Browse files Browse the repository at this point in the history
warning: narrowing conversion from ‘int’ to ‘char’ inside { }
is ill-formed in C++11 [-Wnarrowing]

When pedantic meets esoteric!

No functional change.
  • Loading branch information
mcostalba authored and zamar committed Oct 26, 2014
1 parent 9ba391c commit 5ab5582
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/uci.cpp
Expand Up @@ -241,7 +241,8 @@ string UCI::format_value(Value v, Value alpha, Value beta) {

std::string UCI::format_square(Square s) {

char ch[] = { 'a' + file_of(s), '1' + rank_of(s), 0 }; // Zero-terminating
char ch[] = { char('a' + file_of(s)),
char('1' + rank_of(s)), 0 }; // Zero-terminating
return ch;
}

Expand Down

0 comments on commit 5ab5582

Please sign in to comment.