qt-bugs@ issue : N154723 Trolltech task ID : none bugs.kde.org number : None applied: no author: Dirk Mueller various fixes to get Qt 4.3 without hundreds of warnings compiling --- config.tests/unix/endian.test +++ config.tests/unix/endian.test @@ -30,6 +30,7 @@ [ "$VERBOSE" = "yes" ] && echo " Found 'MostSignificantByteFirst' in binary" ENDIAN="BIG" fi +[ "$VERBOSE" = "yes" ] && make clean || make clean >/dev/null 2>&1 # done if [ "$ENDIAN" = "LITTLE" ]; then --- config.tests/x11/glib/glib.cpp +++ config.tests/x11/glib/glib.cpp @@ -6,7 +6,7 @@ { GMainContext *context; GSource *source; - GPollFD *pollfd; + GPollFD *pollfd = NULL; if (!g_thread_supported()) g_thread_init(NULL); context = g_main_context_default(); --- src/corelib/codecs/qtextcodec.cpp +++ src/corelib/codecs/qtextcodec.cpp @@ -432,7 +432,7 @@ localeMapper = checkForCodec(lang); // 5. "@euro" - if (!localeMapper && ctype && strstr(ctype, "@euro") || lang && strstr(lang, "@euro")) + if ((!localeMapper && ctype && strstr(ctype, "@euro")) || (lang && strstr(lang, "@euro"))) localeMapper = checkForCodec("ISO 8859-15"); // 6. guess locale from ctype unless ctype is "C" --- src/corelib/io/qtextstream.cpp +++ src/corelib/io/qtextstream.cpp @@ -556,8 +556,8 @@ if (!codec || autoDetectUnicode) { autoDetectUnicode = false; - if (bytesRead >= 2 && (uchar(buf[0]) == 0xff && uchar(buf[1]) == 0xfe - || uchar(buf[0]) == 0xfe && uchar(buf[1]) == 0xff)) { + if (bytesRead >= 2 && ((uchar(buf[0]) == 0xff && uchar(buf[1]) == 0xfe) + || (uchar(buf[0]) == 0xfe && uchar(buf[1]) == 0xff))) { codec = QTextCodec::codecForName("UTF-16"); } else if (!codec) { codec = QTextCodec::codecForLocale(); --- src/corelib/io/qurl.cpp +++ src/corelib/io/qurl.cpp @@ -4740,9 +4740,9 @@ if (include.isEmpty()) { for (int i = 0; i < len; ++i) { unsigned char c = *inputData++; - if (c >= 0x61 && c <= 0x7A // ALPHA - || c >= 0x41 && c <= 0x5A // ALPHA - || c >= 0x30 && c <= 0x39 // DIGIT + if ((c >= 0x61 && c <= 0x7A) // ALPHA + || (c >= 0x41 && c <= 0x5A) // ALPHA + || (c >= 0x30 && c <= 0x39) // DIGIT || c == 0x2D // - || c == 0x2E // . || c == 0x5F // _ @@ -4759,9 +4759,9 @@ const char * alsoEncode = include.constData(); for (int i = 0; i < len; ++i) { unsigned char c = *inputData++; - if ((c >= 0x61 && c <= 0x7A // ALPHA - || c >= 0x41 && c <= 0x5A // ALPHA - || c >= 0x30 && c <= 0x39 // DIGIT + if (((c >= 0x61 && c <= 0x7A) // ALPHA + || (c >= 0x41 && c <= 0x5A) // ALPHA + || (c >= 0x30 && c <= 0x39) // DIGIT || c == 0x2D // - || c == 0x2E // . || c == 0x5F // _ --- src/corelib/tools/qlocale.cpp +++ src/corelib/tools/qlocale.cpp @@ -2609,8 +2609,8 @@ QChar c1 = format.at(i); QChar c2 = format.at(i + 1); - if (c1.unicode() == 'a' && c2.unicode() == 'p' - || c1.unicode() == 'A' && c2.unicode() == 'P') + if ((c1.unicode() == 'a' && c2.unicode() == 'p') + || (c1.unicode() == 'A' && c2.unicode() == 'P')) return true; ++i; --- src/gui/kernel/qapplication.cpp +++ src/gui/kernel/qapplication.cpp @@ -2036,11 +2036,11 @@ #ifndef QT_NO_TRANSLATION static bool qt_detectRTLLanguage() { - return force_reverse ^ + return (force_reverse ^ QApplication::tr("QT_LAYOUT_DIRECTION", "Translate this string to the string 'LTR' in left-to-right" " languages or to 'RTL' in right-to-left languages (such as Hebrew" - " and Arabic) to get proper widget layout.") == QLatin1String("RTL"); + " and Arabic) to get proper widget layout.") == QLatin1String("RTL")); } #endif --- src/gui/kernel/qkeymapper_x11.cpp +++ src/gui/kernel/qkeymapper_x11.cpp @@ -1330,8 +1330,8 @@ } if (directionKeyEvent && lastWinId == keyWidget->internalWinId()) { - if (keysym == XK_Shift_L && directionKeyEvent == XK_Control_L || - keysym == XK_Control_L && directionKeyEvent == XK_Shift_L) { + if ((keysym == XK_Shift_L && directionKeyEvent == XK_Control_L) || + (keysym == XK_Control_L && directionKeyEvent == XK_Shift_L)) { directionKeyEvent = Qt::Key_Direction_L; } else if (keysym == XK_Shift_R && directionKeyEvent == XK_Control_R || keysym == XK_Control_R && directionKeyEvent == XK_Shift_R) { --- src/gui/kernel/qwidget.cpp +++ src/gui/kernel/qwidget.cpp @@ -1830,7 +1830,7 @@ for (int i = 0; i < pd->children.size(); ++i) { QWidget *w = qobject_cast(pd->children.at(i)); - if (w && !w->isWindow() && !w->testAttribute(Qt::WA_WState_Created)) + if (w && !w->isWindow() && !w->testAttribute(Qt::WA_WState_Created)) { if (w!=q) { w->create(); } else { @@ -1840,6 +1840,7 @@ if (winid) w->raise(); } + } } } else { q->create(); --- src/gui/painting/qregion_unix.cpp +++ src/gui/painting/qregion_unix.cpp @@ -1944,7 +1944,7 @@ else --isInside; - if (!inside && !isInside || inside && isInside) { + if ((!inside && !isInside) || (inside && isInside)) { pWETE->nextWETE = AET; pWETE = AET; inside = !inside; --- src/tools/uic/driver.cpp +++ src/tools/uic/driver.cpp @@ -175,7 +175,7 @@ static bool isAnsiCCharacter(const QChar& c) { - return c.toUpper() >= QLatin1Char('A') && c.toUpper() <= QLatin1Char('Z') + return (c.toUpper() >= QLatin1Char('A') && c.toUpper() <= QLatin1Char('Z')) || c.isDigit() || c == QLatin1Char('_'); }