[locale] Reduce warnings for gcount()

- The read is at most sizeof(arr), so int is fine. Do
   the cast explicitly.
This commit is contained in:
Adriaan de Groot 2019-04-11 15:12:24 +02:00
parent 620d2a769a
commit b10c7ad9c6

View File

@ -55,7 +55,7 @@ int main(int argc, char** argv)
while( !std::cin.eof() ) { while( !std::cin.eof() ) {
char arr[1024]; char arr[1024];
std::cin.read(arr, sizeof(arr)); std::cin.read(arr, sizeof(arr));
int s = std::cin.gcount(); int s = static_cast<int>( std::cin.gcount() );
ba.append(arr, s); ba.append(arr, s);
} }