[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:
parent
620d2a769a
commit
b10c7ad9c6
@ -54,8 +54,8 @@ int main(int argc, char** argv)
|
|||||||
QByteArray ba;
|
QByteArray ba;
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user