Commit c9ffc770 authored by Friedemann Kleint's avatar Friedemann Kleint

Fix release build warnings about unitialized variables.

Change-Id: I1a6ba631b0626969b328276a91561c34154c9a1c
Reviewed-on: http://codereview.qt.nokia.com/1920Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarLeandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent 02f57e82
......@@ -2791,7 +2791,7 @@ void GdbEngine::extractDataFromInfoBreak(const QString &output, BreakpointModelI
bool locationComing = false;
QByteArray location;
QByteArray function;
qulonglong address;
qulonglong address = 0;
foreach (const QByteArray &part, data.split(' ')) {
if (part.isEmpty())
continue;
......
......@@ -523,7 +523,7 @@ void MiniProjectTargetSelector::removeProject(ProjectExplorer::Project* project)
// Update display names
QString name = project->displayName();
int count = 0;
int otherIndex;
int otherIndex = -1;
for (int i = 0; i < m_projectsBox->count(); ++i) {
Project *p = m_projectsBox->itemData(i).value<Project*>();
if (p->displayName() == name) {
......
......@@ -309,7 +309,7 @@ void QuickToolBar::setProperty(const QString &propertyName, const QVariant &valu
UiObjectDefinition *objectDefinition = cast<UiObjectDefinition*>(m_node);
UiObjectBinding *objectBinding = cast<UiObjectBinding*>(m_node);
UiObjectInitializer *initializer;
UiObjectInitializer *initializer = 0;
if (objectDefinition)
initializer = objectDefinition->initializer;
else if (objectBinding)
......@@ -370,7 +370,7 @@ void QuickToolBar::removeProperty(const QString &propertyName)
UiObjectDefinition *objectDefinition = cast<UiObjectDefinition*>(m_node);
UiObjectBinding *objectBinding = cast<UiObjectBinding*>(m_node);
UiObjectInitializer *initializer;
UiObjectInitializer *initializer = 0;
if (objectDefinition)
initializer = objectDefinition->initializer;
else if (objectBinding)
......
......@@ -80,8 +80,8 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(QmlProjectTarget *parent,
m_qmlViewerArgs(source->m_qmlViewerArgs),
m_projectTarget(parent),
m_usingCurrentFile(source->m_usingCurrentFile),
m_userEnvironmentChanges(source->m_userEnvironmentChanges),
m_isEnabled(source->m_isEnabled)
m_isEnabled(source->m_isEnabled),
m_userEnvironmentChanges(source->m_userEnvironmentChanges)
{
ctor();
updateQtVersions();
......
......@@ -169,7 +169,7 @@ LibraryWizardDialog::LibraryWizardDialog(const QString &templateName,
m_filesPageId = addPage(m_filesPage);
Utils::WizardProgressItem *introItem = wizardProgress()->item(startId());
Utils::WizardProgressItem *targetItem;
Utils::WizardProgressItem *targetItem = 0;
if (m_targetPageId != -1)
targetItem = wizardProgress()->item(m_targetPageId);
Utils::WizardProgressItem *mobileItem = wizardProgress()->item(m_mobilePageId);
......
......@@ -62,6 +62,7 @@ bool StopMonitoringHandler::canHandle(const ProjectExplorer::Task &task)
void StopMonitoringHandler::handle(const ProjectExplorer::Task &task)
{
Q_ASSERT(canHandle(task));
Q_UNUSED(task);
TaskList::TaskListPlugin::instance()->stopMonitoring();
}
......
......@@ -374,7 +374,8 @@ bool BaseTextDocument::save(QString *errorString, const QString &fileName, bool
// When autosaving, we don't want to modify the document/location under the user's fingers.
BaseTextEditorWidget *editorWidget = 0;
int savedPosition, savedAnchor;
int savedPosition = 0;
int savedAnchor = 0;
int undos = d->m_document->availableUndoSteps();
// When saving the current editor, make sure to maintain the cursor position for undo
......
......@@ -184,7 +184,7 @@ void DiffHighlighter::highlightBlock(const QString &text)
// codefolding:
TextEditor::TextBlockUserData *data =
TextEditor::BaseTextDocumentLayout::userData(currentBlock());
Q_ASSERT(data);
QTC_ASSERT(data, return; );
if (!TextEditor::BaseTextDocumentLayout::testUserData(currentBlock().previous()))
m_d->m_foldingState = Internal::StartOfFile;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment