diff options
author | Dimitrios Apostolou <jimis@qt.io> | 2020-07-04 05:28:39 +0200 |
---|---|---|
committer | Dimitrios Apostolou <jimis@qt.io> | 2020-07-16 01:04:44 +0200 |
commit | 3da9cff84599c613a440e320e649dd957e89ecfb (patch) | |
tree | 26427901038b1a83e3f10ca7c147bab9fb366cc5 | |
parent | 273be0b9e61246e932a776b35de29c6bf6d85b41 (diff) |
Avoid warnings regarding bit-field signedness
Up to (including) C++11, integral bitfields of unspecified signedness have
implementation dependent signedness.
Detected by LGTM.com static analyzer.
Pick-to: 5.15
Change-Id: Ibaa0fdc6e443495a3cd40330c4573c9cc6ccdf5b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | src/corelib/kernel/qobject_p.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 4 | ||||
-rw-r--r-- | src/gui/text/qfont_p.h | 2 | ||||
-rw-r--r-- | src/gui/text/qtextdocument_p.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index d3285b292f..2a5104c3dd 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -152,7 +152,7 @@ public: uint id = 0; ushort method_offset; ushort method_relative; - int signal_index : 27; // In signal range (see QObjectPrivate::signalIndex()) + signed int signal_index : 27; // In signal range (see QObjectPrivate::signalIndex()) ushort connectionType : 3; // 0 == auto, 1 == direct, 2 == queued, 4 == blocking ushort isSlotObject : 1; ushort ownArgumentTypes : 1; diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 13629f1fea..30d0aab855 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -349,8 +349,8 @@ struct QSpanData ConicalGradient, Texture } type : 8; - int txop : 8; - int fast_matrix : 1; + signed int txop : 8; + uint fast_matrix : 1; bool bilinear; QImage *tempImage; QRgba64 solidColor; diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index 5d8f0daacd..d2d240b134 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -97,7 +97,7 @@ struct QFontDef uint hintingPreference : 2; uint ignorePitch : 1; uint fixedPitchComputed : 1; // for Mac OS X only - int reserved : 14; // for future extensions + uint reserved : 14; // for future extensions bool exactMatch(const QFontDef &other) const; bool operator==(const QFontDef &other) const diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index 2154086409..b4e0f526d0 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -113,7 +113,7 @@ public: mutable QTextLayout *layout; mutable QTextBlockUserData *userData; mutable int userState; - mutable int revision : 31; + mutable signed int revision : 31; mutable uint hidden : 1; }; |