Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.11.3
-
None
-
-
2c6ec2c653af7f04bb98c6403b2e406cd493a8ab (qt/qtbase/5.12)
Description
qt-everywhere-src-5.11.3/qtbase/src/corelib/codecs/qwindowscodec.cpp:182]: (style) Checking if unsigned variable 'size' is less than zero.
Source code is
size_t size = mbstowcs(NULL, mb, length); if (size < 0) { Q_ASSERT("Error in CE TextCodec"); return QString(); }
Maybe better code
size_t size = mbstowcs(NULL, mb, length); if (size == (size_t) -1) { Q_ASSERT("Error in CE TextCodec"); return QString(); }
Attachments
For Gerrit Dashboard: QTBUG-72286 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
247410,3 | Fix tautological compare in error checking | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |