diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-09-05 15:24:35 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-07 06:23:00 +0200 |
commit | 23951b38d4d4e2134a0caca26d12963251fb8e92 (patch) | |
tree | 6bd51190472b8a8b10e2f868c34c822efefd539d /src | |
parent | 903903147924641a84e62432037b006c6bf541b7 (diff) |
Fix g++ compiler warnings.
Unused variables, unsigned comparison DWORD >= 0 is always
true, format string.
Change-Id: I9f0a20392e262b2542fb23ea4f513e4c4e354b68
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qpixmap.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 4 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index c2b37357c7..240c25d085 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -1040,7 +1040,7 @@ int QEventDispatcherWin32::remainingTime(int timerId) } #ifndef QT_NO_DEBUG - qWarning("QEventDispatcherWin32::remainingTime: timer id %s not found", timerId); + qWarning("QEventDispatcherWin32::remainingTime: timer id %d not found", timerId); #endif return -1; diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index c0c30bae8f..f2713f6b8b 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -219,7 +219,7 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID) } while (ret == WAIT_TIMEOUT); } - if (ret == WAIT_FAILED || !(ret >= WAIT_OBJECT_0 && ret < WAIT_OBJECT_0 + uint(count))) { + if (ret == WAIT_FAILED || ret >= WAIT_OBJECT_0 + uint(count)) { qWarning("QThread internal error while waiting for adopted threads: %d", int(GetLastError())); continue; } diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index a082cf426e..be34671be0 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -841,7 +841,9 @@ bool QPixmap::doImageIO(QImageWriter *writer, int quality) const void QPixmap::fill(const QPaintDevice *device, const QPoint &p) { - qWarning() << "QPixmap::fill(const QPaintDevice *device, const QPoint &offset) is deprecated, ignored"; + Q_UNUSED(device) + Q_UNUSED(p) + qWarning("%s is deprecated, ignored", Q_FUNC_INFO); } diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index ba7e2ddacf..7584d7da6b 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -730,7 +730,7 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite m_modifiedState = m_undoState = 0; m_cursor = (pos < 0 || pos > m_text.length()) ? m_text.length() : pos; m_textDirty = (oldText != m_text); - bool changed = finishChange(-1, true, edited); + const bool changed = finishChange(-1, true, edited); #ifndef QT_NO_ACCESSIBILITY if (changed) { @@ -748,6 +748,8 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite QAccessible::updateAccessibility(&event); } } +#else + Q_UNUSED(changed) #endif } |