From b10c7ad9c6f441c001a556ba9c6cd61b183364b8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 11 Apr 2019 15:12:24 +0200 Subject: [PATCH] [locale] Reduce warnings for gcount() - The read is at most sizeof(arr), so int is fine. Do the cast explicitly. --- src/modules/locale/test_geoip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/locale/test_geoip.cpp b/src/modules/locale/test_geoip.cpp index 5ba43f72e..89c1b6030 100644 --- a/src/modules/locale/test_geoip.cpp +++ b/src/modules/locale/test_geoip.cpp @@ -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( std::cin.gcount() ); ba.append(arr, s); }