summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITArithmetic.cpp1
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_compile.cpp2
-rw-r--r--src/activeqt/container/qaxscript.cpp5
-rw-r--r--src/activeqt/container/qaxwidget.cpp7
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp6
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/dbus/qdbusintegrator.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativepincharea_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp1
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp6
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp1
-rw-r--r--src/gui/dialogs/qpagesetupdialog_win.cpp3
-rw-r--r--src/gui/itemviews/qtableview.cpp1
-rw-r--r--src/gui/kernel/qkeymapper_win.cpp10
-rw-r--r--src/gui/kernel/qole_win.cpp3
-rw-r--r--src/gui/kernel/qwidget_win.cpp2
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp1
-rw-r--r--src/gui/util/qcompleter.cpp2
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp2
-rw-r--r--src/gui/widgets/qplaintextedit.cpp1
-rw-r--r--src/network/access/qftp.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker.cpp5
-rw-r--r--src/opengl/qpaintengine_opengl.cpp3
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp2
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp1
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux.cpp5
-rw-r--r--src/scripttools/debugging/qscriptsyntaxhighlighter.cpp8
-rw-r--r--src/tools/uic3/form.cpp12
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator.cpp1
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp3
-rw-r--r--tools/activeqt/dumpcpp/main.cpp1
-rw-r--r--tools/assistant/tools/assistant/bookmarkmodel.cpp2
-rw-r--r--tools/porting/src/port.cpp2
-rw-r--r--tools/porting/src/semantic.cpp16
-rw-r--r--tools/qdoc3/codemarker.cpp2
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp4
-rw-r--r--tools/qdoc3/htmlgenerator.cpp2
-rw-r--r--tools/qdoc3/qmlcodeparser.cpp2
-rw-r--r--tools/qdoc3/qmlvisitor.cpp2
42 files changed, 47 insertions, 94 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITArithmetic.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITArithmetic.cpp
index edd7d2b..927b192 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITArithmetic.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITArithmetic.cpp
@@ -2339,7 +2339,6 @@ void JIT::emitSlow_op_mul(Instruction* currentInstruction, Vector<SlowCaseEntry>
unsigned result = currentInstruction[1].u.operand;
unsigned op1 = currentInstruction[2].u.operand;
unsigned op2 = currentInstruction[3].u.operand;
- OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
bool op1HasImmediateIntFastCase = isOperandConstantImmediateInt(op1) && getConstantOperandImmediateInt(op1) > 0;
bool op2HasImmediateIntFastCase = !op1HasImmediateIntFastCase && isOperandConstantImmediateInt(op2) && getConstantOperandImmediateInt(op2) > 0;
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_compile.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_compile.cpp
index 2bedca6..ef53f3c 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_compile.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_compile.cpp
@@ -579,7 +579,6 @@ compileBranch(int options, int* brackets, unsigned char** codePtr,
unsigned char* tempcode;
bool didGroupSetFirstByte = false;
const UChar* ptr = *ptrPtr;
- const UChar* tempptr;
unsigned char* previous = NULL;
unsigned char classbits[32];
@@ -1586,7 +1585,6 @@ compileBranch(int options, int* brackets, unsigned char** codePtr,
for validity in the pre-compiling pass. */
case '\\':
- tempptr = ptr;
c = checkEscape(&ptr, patternEnd, errorCodePtr, cd.numCapturingBrackets, false);
/* Handle metacharacters introduced by \. For ones like \d, the ESC_ values
diff --git a/src/activeqt/container/qaxscript.cpp b/src/activeqt/container/qaxscript.cpp
index dd6c3a2..8146f80 100644
--- a/src/activeqt/container/qaxscript.cpp
+++ b/src/activeqt/container/qaxscript.cpp
@@ -561,6 +561,7 @@ long QAxScriptEngine::queryInterface(const QUuid &uuid, void **iface) const
#ifndef QT_NO_QAXSCRIPT
return engine->QueryInterface(uuid, iface);
#else
+ Q_UNUSED(uuid)
return E_NOTIMPL;
#endif
}
@@ -593,6 +594,8 @@ void QAxScriptEngine::setState(State st)
return;
engine->SetScriptState((SCRIPTSTATE)st);
+#else
+ Q_UNUSED(st)
#endif
}
@@ -607,6 +610,8 @@ void QAxScriptEngine::addItem(const QString &name)
return;
engine->AddNamedItem((wchar_t*)name.utf16(), SCRIPTITEM_ISSOURCE|SCRIPTITEM_ISVISIBLE);
+#else
+ Q_UNUSED(name)
#endif
}
diff --git a/src/activeqt/container/qaxwidget.cpp b/src/activeqt/container/qaxwidget.cpp
index 70befee..4d4c872 100644
--- a/src/activeqt/container/qaxwidget.cpp
+++ b/src/activeqt/container/qaxwidget.cpp
@@ -560,7 +560,6 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
host = new QAxHostWidget(widget, this);
bool showHost = false;
- HRESULT hr = S_OK;
if (!m_spOleObject)
widget->queryInterface(IID_IOleObject, (void**)&m_spOleObject);
if (m_spOleObject) {
@@ -577,8 +576,8 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
// try to activate as document server
IStorage *storage = 0;
ILockBytes * bytes = 0;
- HRESULT hres = ::CreateILockBytesOnHGlobal(0, TRUE, &bytes);
- hres = ::StgCreateDocfileOnILockBytes(bytes, STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE, 0, &storage);
+ ::CreateILockBytesOnHGlobal(0, TRUE, &bytes);
+ ::StgCreateDocfileOnILockBytes(bytes, STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_READWRITE, 0, &storage);
persistStorage->InitNew(storage);
persistStorage->Release();
@@ -694,7 +693,7 @@ bool QAxClientSite::activateObject(bool initialized, const QByteArray &data)
RECT rcPos = { host->x(), host->y(), host->x()+sizehint.width(), host->y()+sizehint.height() };
- hr = m_spOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, 0, (IOleClientSite*)this, 0, host->winId(), &rcPos);
+ m_spOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, 0, (IOleClientSite*)this, 0, host->winId(), &rcPos);
if (!m_spOleControl)
m_spOleObject->QueryInterface(IID_IOleControl, (void**)&m_spOleControl);
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 4cc09b3..6ea705c 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -625,8 +625,6 @@ QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEng
bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSystemMetaData &data,
QFileSystemMetaData::MetaDataFlags what)
{
- QAbstractFileEngine::FileFlags ret = 0;
-
#if !defined(QT_NO_LIBRARY)
if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
resolveLibs();
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index bcd58b2..4d74316 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -661,7 +661,7 @@ void QEventDispatcherWin32Private::doWsaAsyncSelect(int socket)
sn_event |= FD_OOB;
// BoundsChecker may emit a warning for WSAAsyncSelect when sn_event == 0
// This is a BoundsChecker bug and not a Qt bug
- WSAAsyncSelect(socket, internalHwnd, sn_event ? WM_QT_SOCKETNOTIFIER : 0, sn_event);
+ WSAAsyncSelect(socket, internalHwnd, sn_event ? unsigned(WM_QT_SOCKETNOTIFIER) : unsigned(0), sn_event);
}
void QEventDispatcherWin32::createInternalHwnd()
@@ -808,7 +808,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
TranslateMessage(&msg);
DispatchMessage(&msg);
}
- } else if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
+ } else if (waitRet < WAIT_OBJECT_0 + nCount) {
d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));
} else {
// nothing todo so break
@@ -830,7 +830,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
emit aboutToBlock();
waitRet = MsgWaitForMultipleObjectsEx(nCount, pHandles, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE | MWMO_INPUTAVAILABLE);
emit awake();
- if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
+ if (waitRet < WAIT_OBJECT_0 + nCount) {
d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));
retVal = true;
}
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 91136b8..9c9e9b8 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -228,7 +228,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/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 2ca8fb2..d29e20f 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -911,10 +911,8 @@ void QDBusConnectionPrivate::deliverCall(QObject *object, int /*flags*/, const Q
}
}
- bool takesMessage = false;
if (metaTypes.count() > i && metaTypes[i] == QDBusMetaTypeId::message) {
params.append(const_cast<void*>(static_cast<const void*>(&msg)));
- takesMessage = true;
++i;
}
diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
index b15ddbd..bfa27a8 100644
--- a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
@@ -68,10 +68,10 @@ class QDeclarativePinchAreaPrivate : public QDeclarativeItemPrivate
public:
QDeclarativePinchAreaPrivate()
: absorb(true), stealMouse(false), inPinch(false)
- , pinchRejected(false), pinchActivated(false)
+ , pinchRejected(false), pinchActivated(false), touchEventsActive(false)
, pinch(0), pinchStartDist(0), pinchStartScale(1.0)
, pinchLastScale(1.0), pinchStartRotation(0.0), pinchStartAngle(0.0)
- , pinchLastAngle(0.0), pinchRotation(0.0), touchEventsActive(false)
+ , pinchLastAngle(0.0), pinchRotation(0.0)
{
}
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index a9fbd3f..081db4a 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -1106,7 +1106,6 @@ bool QDeclarativeTextPrivate::setHAlign(QDeclarativeText::HAlignment alignment,
{
Q_Q(QDeclarativeText);
if (hAlign != alignment || forceAlign) {
- QDeclarativeText::HAlignment oldEffectiveHAlign = q->effectiveHAlign();
hAlign = alignment;
emit q->horizontalAlignmentChanged(hAlign);
return true;
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index fd14eb2..d45d40b 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -534,7 +534,6 @@ bool QDeclarativeTextEditPrivate::setHAlign(QDeclarativeTextEdit::HAlignment ali
{
Q_Q(QDeclarativeTextEdit);
if (hAlign != alignment || forceAlign) {
- QDeclarativeTextEdit::HAlignment oldEffectiveHAlign = q->effectiveHAlign();
hAlign = alignment;
emit q->horizontalAlignmentChanged(alignment);
return true;
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 16b8e89..8148eca 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -394,7 +394,6 @@ bool QDeclarativeTextInputPrivate::setHAlign(QDeclarativeTextInput::HAlignment a
{
Q_Q(QDeclarativeTextInput);
if ((hAlign != alignment || forceAlign) && alignment <= QDeclarativeTextInput::AlignHCenter) { // justify not supported
- QDeclarativeTextInput::HAlignment oldEffectiveHAlign = q->effectiveHAlign();
hAlign = alignment;
emit q->horizontalAlignmentChanged(alignment);
return true;
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index bb563fd..b057257 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -266,7 +266,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
case QVariant::PointF:
{
bool ok;
- QPointF point = QDeclarativeStringConverters::pointFFromString(string, &ok);
+ QDeclarativeStringConverters::pointFFromString(string, &ok);
if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: point expected"));
}
break;
@@ -274,7 +274,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
case QVariant::SizeF:
{
bool ok;
- QSizeF size = QDeclarativeStringConverters::sizeFFromString(string, &ok);
+ QDeclarativeStringConverters::sizeFFromString(string, &ok);
if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: size expected"));
}
break;
@@ -282,7 +282,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
case QVariant::RectF:
{
bool ok;
- QRectF rect = QDeclarativeStringConverters::rectFFromString(string, &ok);
+ QDeclarativeStringConverters::rectFFromString(string, &ok);
if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: rect expected"));
}
break;
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index 8094a92..e6b9775 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -1450,7 +1450,6 @@ struct ValueTypeSerializedData : public SerializedData {
QByteArray QDeclarativePropertyPrivate::saveValueType(const QMetaObject *metaObject, int index,
const QMetaObject *subObject, int subIndex)
{
- QMetaProperty prop = metaObject->property(index);
QMetaProperty subProp = subObject->property(subIndex);
ValueTypeSerializedData sd;
diff --git a/src/gui/dialogs/qpagesetupdialog_win.cpp b/src/gui/dialogs/qpagesetupdialog_win.cpp
index c928284..2c647da 100644
--- a/src/gui/dialogs/qpagesetupdialog_win.cpp
+++ b/src/gui/dialogs/qpagesetupdialog_win.cpp
@@ -101,9 +101,6 @@ int QPageSetupDialog::exec()
Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
psd.hwndOwner = parent ? parent->winId() : 0;
- QRect paperRect = d->printer->paperRect();
- QRect pageRect = d->printer->pageRect();
-
psd.Flags = PSD_MARGINS;
double multiplier = 1;
switch (QLocale::system().measurementSystem()) {
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 3e48993..1476ecb 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -3188,6 +3188,7 @@ void QTableView::selectionChanged(const QItemSelection &selected,
{
#ifndef QT_NO_ACCESSIBILITY
Q_D(QTableView);
+ Q_UNUSED(d)
if (QAccessible::isActive()) {
// ### does not work properly for selection ranges.
QModelIndex sel = selected.indexes().value(0);
diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp
index 681ab6c..dfa7c96 100644
--- a/src/gui/kernel/qkeymapper_win.cpp
+++ b/src/gui/kernel/qkeymapper_win.cpp
@@ -819,10 +819,10 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
// Get the modifier states (may be altered later, depending on key code)
int state = 0;
- state |= (nModifiers & ShiftAny ? Qt::ShiftModifier : 0);
- state |= (nModifiers & ControlAny ? Qt::ControlModifier : 0);
- state |= (nModifiers & AltAny ? Qt::AltModifier : 0);
- state |= (nModifiers & MetaAny ? Qt::MetaModifier : 0);
+ state |= (nModifiers & ShiftAny ? int(Qt::ShiftModifier) : 0);
+ state |= (nModifiers & ControlAny ? int(Qt::ControlModifier) : 0);
+ state |= (nModifiers & AltAny ? int(Qt::AltModifier) : 0);
+ state |= (nModifiers & MetaAny ? int(Qt::MetaModifier) : 0);
// Now we know enough to either have MapVirtualKey or our own keymap tell us if it's a deadkey
bool isDeadKey = isADeadKey(msg.wParam, state)
@@ -966,7 +966,7 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
case Qt::Key_9:
state |= ((msg.wParam >= '0' && msg.wParam <= '9')
|| (msg.wParam >= VK_OEM_PLUS && msg.wParam <= VK_OEM_3))
- ? 0 : Qt::KeypadModifier;
+ ? 0 : int(Qt::KeypadModifier);
default:
if ((uint)msg.lParam == 0x004c0001 || (uint)msg.lParam == 0xc04c0001)
state |= Qt::KeypadModifier;
diff --git a/src/gui/kernel/qole_win.cpp b/src/gui/kernel/qole_win.cpp
index b111742..7c3be23 100644
--- a/src/gui/kernel/qole_win.cpp
+++ b/src/gui/kernel/qole_win.cpp
@@ -232,7 +232,6 @@ bool QOleEnumFmtEtc::copyFormatEtc(LPFORMATETC dest, LPFORMATETC src) const
*dest = *src;
if (src->ptd) {
- LPVOID pout;
LPMALLOC pmalloc;
#if !defined(Q_OS_WINCE)
@@ -242,7 +241,7 @@ bool QOleEnumFmtEtc::copyFormatEtc(LPFORMATETC dest, LPFORMATETC src) const
#endif
return false;
- pout = (LPVOID)pmalloc->Alloc(src->ptd->tdSize);
+ pmalloc->Alloc(src->ptd->tdSize);
memcpy(dest->ptd, src->ptd, size_t(src->ptd->tdSize));
pmalloc->Release();
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 6afac03..5b125b2 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -1471,7 +1471,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
data.crect.setRect(x, y, w, h);
} else {
GetClientRect(q->internalWinId(), &rect);
- RECT rcNormalPosition ={0};
+ RECT rcNormalPosition ={0, 0, 0, 0};
// Use (0,0) as window position for embedded ActiveQt controls.
if (!tlwExtra || !tlwExtra->embedded)
GetWindowRect(q->internalWinId(), &rcNormalPosition);
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index a697b73..6c1be87 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -518,7 +518,6 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
Q_ASSERT(type == path.elements() || *type == QPainterPath::MoveToElement);
QPointF p = QPointF(points[0], points[1]) * state->matrix;
- QPointF movedTo = p;
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = -1;
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 8245ba1..09cbe2b 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -474,6 +474,8 @@ QMatchData QCompletionEngine::filterHistory()
return QMatchData();
bool isDirModel = false;
bool isFsModel = false;
+ Q_UNUSED(isDirModel)
+ Q_UNUSED(isFsModel)
#ifndef QT_NO_DIRMODEL
isDirModel = (qobject_cast<QDirModel *>(source) != 0);
#endif
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp
index 03853ac..f449b27 100644
--- a/src/gui/util/qsystemtrayicon_win.cpp
+++ b/src/gui/util/qsystemtrayicon_win.cpp
@@ -424,7 +424,7 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
if (currentIconHandle == winId() &&
currentIconId == iconId && !isHidden) {
SendMessage(trayHandle, TB_GETITEMRECT, toolbarButton , (LPARAM)data);
- RECT iconRect = {0, 0};
+ RECT iconRect = {0, 0, 0, 0};
if(ReadProcessMemory(trayProcess, data, &iconRect, sizeof(RECT), &numBytes)) {
MapWindowPoints(trayHandle, NULL, (LPPOINT)&iconRect, 2);
QRect geometry(iconRect.left + 1, iconRect.top + 1,
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index f1fc4bf..71c1b3b 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1833,7 +1833,6 @@ static void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, QRectF
*/
void QPlainTextEdit::paintEvent(QPaintEvent *e)
{
- Q_D(QPlainTextEdit);
QPainter painter(viewport());
Q_ASSERT(qobject_cast<QPlainTextDocumentLayout*>(document()->documentLayout()));
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index db2969a..0e8b0eb 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -551,7 +551,7 @@ static void _q_parseUnixDir(const QStringList &tokens, const QString &userName,
}
if (dateTime.isValid())
info->setLastModified(dateTime);
- else if (dateString.startsWith("Feb 29")) {
+ else if (dateString.startsWith(QLatin1String("Feb 29"))) {
// When the current year on the FTP server is a leap year and a
// file's last modified date is Feb 29th, and the current day on
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
index c32803c..07701c6 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
@@ -513,21 +513,18 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
m_dash_stroker.setMiterLimit(pen.miterLimit());
m_dash_stroker.setClipRect(clip);
- float curvynessAdd, curvynessMul, roundness = 0;
+ float curvynessAdd, curvynessMul;
// simplfy pens that are thin in device size (2px wide or less)
if (width < 2.5 && (cosmetic || m_inv_scale == 1)) {
curvynessAdd = 0.5;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = 1;
} else if (cosmetic) {
curvynessAdd= width / 2;
curvynessMul= CURVE_FLATNESS;
- roundness = qMax<int>(4, width * CURVE_FLATNESS);
} else {
curvynessAdd = width * m_inv_scale;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = qMax<int>(4, width * curvynessMul);
}
if (count < 2)
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 5948e3e..9368b3b 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -1561,8 +1561,6 @@ void QOpenGLPaintEnginePrivate::updateGradient(const QBrush &brush, const QRectF
bool has_mirrored_repeat = QGLExtensions::glExtensions() & QGLExtensions::MirroredRepeat;
Qt::BrushStyle style = brush.style();
- QTransform m = brush.transform();
-
if (has_mirrored_repeat && style == Qt::LinearGradientPattern) {
const QLinearGradient *g = static_cast<const QLinearGradient *>(brush.gradient());
QTransform m = brush.transform();
@@ -3781,7 +3779,6 @@ void QOpenGLPaintEngine::drawLines(const QLineF *lines, int lineCount)
} else {
QVarLengthArray<GLfloat> vertexArray(4 * lineCount);
for (int i = 0; i < lineCount; ++i) {
- const QPointF a = lines[i].p1();
vertexArray[4*i] = lines[i].x1();
vertexArray[4*i+1] = lines[i].y1();
vertexArray[4*i+2] = lines[i].x2();
diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp
index af273af..49417f8 100644
--- a/src/plugins/accessible/widgets/complexwidgets.cpp
+++ b/src/plugins/accessible/widgets/complexwidgets.cpp
@@ -1627,6 +1627,8 @@ QString QAccessibleTabBar::actionText(int action, Text t, int child) const
return QTabBar::tr("Activate the tab");
}
break;
+ default:
+ break;
}
return QString();
}
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index d886bfb..8747367 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -756,6 +756,7 @@ QString QAccessibleGroupBox::localizedName(int actionIndex)
QStringList QAccessibleGroupBox::keyBindings(int actionIndex)
{
+ Q_UNUSED(actionIndex)
return QStringList();
}
diff --git a/src/plugins/bearer/connman/qofonoservice_linux.cpp b/src/plugins/bearer/connman/qofonoservice_linux.cpp
index dee6339..6a081c4 100644
--- a/src/plugins/bearer/connman/qofonoservice_linux.cpp
+++ b/src/plugins/bearer/connman/qofonoservice_linux.cpp
@@ -932,11 +932,8 @@ void QOfonoSmsInterface::sendMessage(const QString &to, const QString &message)
QDBusReply<QString> reply = this->call(QLatin1String("SendMessage"),
QVariant::fromValue(to),
QVariant::fromValue(message));
- bool ok = true;
- if(reply.error().type() == QDBusError::InvalidArgs) {
+ if (reply.error().type() == QDBusError::InvalidArgs)
qWarning() << reply.error().message();
- ok = false;
- }
}
QT_END_NAMESPACE
diff --git a/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp b/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
index 46b190d..1e25b68 100644
--- a/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
+++ b/src/scripttools/debugging/qscriptsyntaxhighlighter.cpp
@@ -235,7 +235,6 @@ void QScriptSyntaxHighlighter::highlightBlock(const QString &text)
QChar lastChar;
int firstNonSpace = -1;
- int lastNonSpace = -1;
for (;;) {
const QChar c = text.at(i);
@@ -337,11 +336,8 @@ void QScriptSyntaxHighlighter::highlightBlock(const QString &text)
}
}
- if (input != InputSpace) {
- if (firstNonSpace < 0)
- firstNonSpace = i;
- lastNonSpace = i;
- }
+ if (input != InputSpace && firstNonSpace < 0)
+ firstNonSpace = i;
lastWasBackSlash = !lastWasBackSlash && c == QLatin1Char('\\');
diff --git a/src/tools/uic3/form.cpp b/src/tools/uic3/form.cpp
index 7a73203..2b132f5 100644
--- a/src/tools/uic3/form.cpp
+++ b/src/tools/uic3/form.cpp
@@ -197,20 +197,8 @@ void Ui3Reader::createFormDecl(const QDomElement &e)
}
out << endl;
- bool dbForm = false;
registerDatabases(e);
dbConnections = unique(dbConnections);
- if (dbForms[QLatin1String("(default)")].count())
- dbForm = true;
- bool subDbForms = false;
- for (it = dbConnections.constBegin(); it != dbConnections.constEnd(); ++it) {
- if (!(*it).isEmpty() && (*it) != QLatin1String("(default)")) {
- if (dbForms[(*it)].count()) {
- subDbForms = true;
- break;
- }
- }
- }
// some typedefs, maybe
typeDefs = unique(typeDefs);
diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp
index 8008d0b..c8db2b4 100644
--- a/src/xmlpatterns/api/qxmlschemavalidator.cpp
+++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp
@@ -206,7 +206,6 @@ bool QXmlSchemaValidator::validate(QIODevice *source, const QUrl &documentUri) c
return false;
}
- QXmlNodeModelIndex index = item.asNode();
const QAbstractXmlNodeModel *model = item.asNode().model();
QPatternist::XsdValidatedXmlNodeModel *validatedModel = new QPatternist::XsdValidatedXmlNodeModel(model);
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp
index 1abfa18..7620202 100644
--- a/src/xmlpatterns/schema/qxsdschemaparser.cpp
+++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp
@@ -1731,12 +1731,9 @@ void XsdSchemaParser::parseUnion(const XsdSimpleType::Ptr &ptr)
// The memberTypes attribute is not allowed to be empty,
// so we keep track of that
- bool hasMemberTypesAttribute = false;
bool hasMemberTypesSpecified = false;
if (hasAttribute(QString::fromLatin1("memberTypes"))) {
- hasMemberTypesAttribute = true;
-
const QStringList memberTypes = readAttribute(QString::fromLatin1("memberTypes")).split(QLatin1Char(' '), QString::SkipEmptyParts);
QList<QXmlName> typeNames;
diff --git a/tools/activeqt/dumpcpp/main.cpp b/tools/activeqt/dumpcpp/main.cpp
index e97067a..208fd4f 100644
--- a/tools/activeqt/dumpcpp/main.cpp
+++ b/tools/activeqt/dumpcpp/main.cpp
@@ -371,7 +371,6 @@ void generateClassDecl(QTextStream &out, const QString &controlID, const QMetaOb
if (property.isWritable()) {
QByteArray setter(propertyName);
- QChar firstChar = QLatin1Char(setter.at(0));
if (isupper(setter.at(0))) {
setter = "Set" + setter;
} else {
diff --git a/tools/assistant/tools/assistant/bookmarkmodel.cpp b/tools/assistant/tools/assistant/bookmarkmodel.cpp
index a50f696..a813044 100644
--- a/tools/assistant/tools/assistant/bookmarkmodel.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmodel.cpp
@@ -48,7 +48,7 @@
#include <QtGui/QStyle>
#include <QtGui/QTreeView>
-const quint32 VERSION = 0xe53798;
+const qint32 VERSION = 0xe53798;
const QLatin1String MIMETYPE("application/bookmarks.assistant");
BookmarkModel::BookmarkModel()
diff --git a/tools/porting/src/port.cpp b/tools/porting/src/port.cpp
index 6b5bcff..394f3ac 100644
--- a/tools/porting/src/port.cpp
+++ b/tools/porting/src/port.cpp
@@ -144,7 +144,6 @@ int runPort(int argc, char**argv)
bool enableCppParsing = true;
bool useBuildtinQt3Headers = true;
bool showMissingFilesWarnings = false;
- bool alwaysOverwrite = false;
int currentArg = 1;
const Option helpOption(QLatin1String("-h"), QLatin1String("Display this help."));
@@ -205,7 +204,6 @@ int runPort(int argc, char**argv)
} else if (missingFileWarningsOption.checkArgument(argText)) {
showMissingFilesWarnings = true;
} else if (alwaysOverwriteOption.checkArgument(argText)) {
- alwaysOverwrite = true;
FileWriter::instance()->setOverwriteFiles(FileWriter::AlwaysOverWrite);
} else if (argText[0] == QLatin1Char('-')) {
printf("Unknown option %s\n", argText.toLocal8Bit().constData());
diff --git a/tools/porting/src/semantic.cpp b/tools/porting/src/semantic.cpp
index 6268102..62aafce 100644
--- a/tools/porting/src/semantic.cpp
+++ b/tools/porting/src/semantic.cpp
@@ -344,27 +344,27 @@ void Semantic::parseDeclaration(AST *funSpec, AST *storageSpec, TypeSpecifierAST
void Semantic::parseFunctionDeclaration(AST *funSpec, AST *storageSpec,
TypeSpecifierAST * typeSpec, InitDeclaratorAST * initDeclarator)
{
- bool isFriend = false;
bool isVirtual = false;
bool isStatic = false;
- bool isInline = false;
bool isPure = initDeclarator->initializer() != 0;
if (funSpec){
List<AST*> l = *funSpec->children();
foreach (AST *current, l) {
- QByteArray text = textOf(current);
- if (text == "virtual") isVirtual = true;
- else if (text == "inline") isInline = true;
+ if (textOf(current) == "virtual") {
+ isVirtual = true;
+ break;
+ }
}
}
if (storageSpec){
List<AST*> l = *storageSpec->children();
foreach (AST *current, l) {
- QByteArray text = textOf(current);
- if (text == "friend") isFriend = true;
- else if (text == "static") isStatic = true;
+ if (textOf(current) == "static") {
+ isStatic = true;
+ break;
+ }
}
}
DeclaratorAST *declarator = initDeclarator->declarator();
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 87c55d0..9fa6b59 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -527,7 +527,6 @@ QStringList CodeMarker::macRefsForNode(Node *node)
break;
case Node::Function:
{
- bool isMacro = false;
const FunctionNode *func = static_cast<const FunctionNode *>(node);
// overloads are too clever for the Xcode documentation browser
@@ -537,7 +536,6 @@ QStringList CodeMarker::macRefsForNode(Node *node)
if (func->metaness() == FunctionNode::MacroWithParams
|| func->metaness() == FunctionNode::MacroWithoutParams) {
result += QLatin1String("macro/");
- isMacro = true;
#if 0
}
else if (!func->templateStuff().isEmpty()) {
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index f87f03b..720c25c 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -3447,7 +3447,6 @@ void DitaXmlGenerator::writeText(const QString& markedCode,
for (int i = 0, n = src.size(); i < n;) {
if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
i += 2;
- bool handled = false;
for (int k = 0; k != 6; ++k) {
if (parseArg(src, markTags[k], &i, n, &arg, &par1)) {
const Node* n = 0;
@@ -3502,7 +3501,6 @@ void DitaXmlGenerator::writeText(const QString& markedCode,
addLink(link, arg);
}
}
- handled = true;
break;
}
}
@@ -4526,12 +4524,10 @@ QString DitaXmlGenerator::fullQualification(const Node* n)
void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker)
{
QList<RelatedClass>::ConstIterator r;
- int index;
if (!cn->baseClasses().isEmpty()) {
writeStartTag(DT_cxxClassDerivations);
r = cn->baseClasses().begin();
- index = 0;
while (r != cn->baseClasses().end()) {
writeStartTag(DT_cxxClassDerivation);
writeStartTag(DT_cxxClassDerivationAccessSpecifier);
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 770f4df..2684fdf 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1109,13 +1109,11 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
QList<Section>::ConstIterator s;
const ClassNode *classe = 0;
- const NamespaceNode *namespasse = 0;
QString title;
QString rawTitle;
QString fullTitle;
if (inner->type() == Node::Namespace) {
- namespasse = static_cast<const NamespaceNode *>(inner);
rawTitle = marker->plainName(inner);
fullTitle = marker->plainFullName(inner);
title = rawTitle + " Namespace";
diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp
index 66401ae..40ebf79 100644
--- a/tools/qdoc3/qmlcodeparser.cpp
+++ b/tools/qdoc3/qmlcodeparser.cpp
@@ -137,7 +137,7 @@ void QmlCodeParser::parseSourceFile(const Location& location,
}
}
-void QmlCodeParser::doneParsingSourceFiles(Tree *tree)
+void QmlCodeParser::doneParsingSourceFiles(Tree *)
{
}
diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp
index 7045300..fdd9851 100644
--- a/tools/qdoc3/qmlvisitor.cpp
+++ b/tools/qdoc3/qmlvisitor.cpp
@@ -227,7 +227,7 @@ void QmlDocVisitor::endVisit(QDeclarativeJS::AST::UiPublicMember *definition)
lastEndOffset = definition->lastSourceLocation().end();
}
-bool QmlDocVisitor::visit(QDeclarativeJS::AST::IdentifierPropertyName *idproperty)
+bool QmlDocVisitor::visit(QDeclarativeJS::AST::IdentifierPropertyName *)
{
return true;
}