diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-03-08 22:07:46 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-04-08 13:24:04 +0200 |
commit | 7191b8fe38788ac57e15e4124955c3cd8333d858 (patch) | |
tree | cedf6592e8b88c5e73c352caf6fa412314839da3 /src/corelib/io/qipaddress.cpp | |
parent | db797d19a3721bedc0d6b1f179e5e32621be277a (diff) |
Fix some narrowing conversion warnings
ioctl call for FIONREAD takes an int arg, it won't work correctly
otherwise. Cast the return of the read() call to int, because it won't
read more than buffSize (which is an int).
Change-Id: I130202a732684257bbb0e79c9358b60a61010c46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qipaddress.cpp')
-rw-r--r-- | src/corelib/io/qipaddress.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qipaddress.cpp b/src/corelib/io/qipaddress.cpp index 9956f03738..c2b274f8b5 100644 --- a/src/corelib/io/qipaddress.cpp +++ b/src/corelib/io/qipaddress.cpp @@ -61,7 +61,7 @@ static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptL return false; auto [ll, used] = qstrntoull(ptr, stop - ptr, 0); - quint32 x = ll; + const quint32 x = quint32(ll); if (used <= 0 || ll != x) return false; |