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>
This commit is contained in:
Friedemann Kleint 2012-09-05 15:24:35 +02:00 committed by Qt by Nokia
parent 9039031479
commit 23951b38d4
4 changed files with 8 additions and 4 deletions

View File

@ -1040,7 +1040,7 @@ int QEventDispatcherWin32::remainingTime(int timerId)
} }
#ifndef QT_NO_DEBUG #ifndef QT_NO_DEBUG
qWarning("QEventDispatcherWin32::remainingTime: timer id %s not found", timerId); qWarning("QEventDispatcherWin32::remainingTime: timer id %d not found", timerId);
#endif #endif
return -1; return -1;

View File

@ -219,7 +219,7 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID)
} while (ret == WAIT_TIMEOUT); } 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())); qWarning("QThread internal error while waiting for adopted threads: %d", int(GetLastError()));
continue; continue;
} }

View File

@ -841,7 +841,9 @@ bool QPixmap::doImageIO(QImageWriter *writer, int quality) const
void QPixmap::fill(const QPaintDevice *device, const QPoint &p) 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);
} }

View File

@ -730,7 +730,7 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite
m_modifiedState = m_undoState = 0; m_modifiedState = m_undoState = 0;
m_cursor = (pos < 0 || pos > m_text.length()) ? m_text.length() : pos; m_cursor = (pos < 0 || pos > m_text.length()) ? m_text.length() : pos;
m_textDirty = (oldText != m_text); m_textDirty = (oldText != m_text);
bool changed = finishChange(-1, true, edited); const bool changed = finishChange(-1, true, edited);
#ifndef QT_NO_ACCESSIBILITY #ifndef QT_NO_ACCESSIBILITY
if (changed) { if (changed) {
@ -748,6 +748,8 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite
QAccessible::updateAccessibility(&event); QAccessible::updateAccessibility(&event);
} }
} }
#else
Q_UNUSED(changed)
#endif #endif
} }