[locale] Reduce warnings for gcount()

- The read is at most sizeof(arr), so int is fine. Do
   the cast explicitly.
main
Adriaan de Groot 6 years ago
parent 620d2a769a
commit b10c7ad9c6

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

Loading…
Cancel
Save