From ec68f67ee55944e1f05bdbe1362832ee2ab156c7 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 20 Sep 2014 18:08:16 +0200 Subject: XCB: silence warnings about possibly undefined shifts The code shifts "1" by a uint32 number. If that number is >= 32, we're triggering undefined behavior, and Coverity rightfully complains about that. Add some asserts to silence those warnings. Change-Id: Ib91085a279b0a2b7ad37afad05ec1d764c0496b1 Reviewed-by: Uli Schlachter Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbkeyboard.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index a873ba97d7..9bf4f90c20 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -865,6 +865,10 @@ QList QXcbKeyboard::possibleKeys(const QKeyEvent *event) const xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt"); xkb_mod_index_t controlMod = xkb_keymap_mod_get_index(xkb_keymap, "Control"); + Q_ASSERT(shiftMod < 32); + Q_ASSERT(altMod < 32); + Q_ASSERT(controlMod < 32); + xkb_mod_mask_t depressed; struct xkb_keymap *fallback_keymap = 0; int qtKey = 0; -- cgit v1.2.3 From d0a6fcd925dc2a1553e2086e85f59ba76db85bef Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 8 Oct 2014 09:11:30 +1000 Subject: Fix QtBearer connman backend report correctly on lte network Task-number: QTBUG-41813 Change-Id: I977facc2ee59571d24e60ac9d5d41e957403b344 Reviewed-by: Richard J. Moore --- src/plugins/bearer/connman/qconnmanengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp index ee219f00ac..d55db05b1b 100644 --- a/src/plugins/bearer/connman/qconnmanengine.cpp +++ b/src/plugins/bearer/connman/qconnmanengine.cpp @@ -435,7 +435,7 @@ QNetworkConfiguration::BearerType QConnmanEngine::ofonoTechToBearerType(const QS } else if (currentTechnology == QLatin1String("hspa")) { return QNetworkConfiguration::BearerHSPA; } else if (currentTechnology == QLatin1String("lte")) { - return QNetworkConfiguration::BearerWiMAX; //not exact + return QNetworkConfiguration::BearerLTE; } } return QNetworkConfiguration::BearerUnknown; -- cgit v1.2.3