forked from qt-creator/qt-creator
Fix gcc warnings about unused variables.
These appear when compiling in release mode. Change-Id: I76ee3b1b8d728fd839d713ee4f914b6965851b99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
@@ -282,6 +282,7 @@ void QPacketProtocol::send(const QPacket & p)
|
|||||||
Q_ASSERT(writeBytes == sizeof(qint32));
|
Q_ASSERT(writeBytes == sizeof(qint32));
|
||||||
writeBytes = d->dev->write(p.b);
|
writeBytes = d->dev->write(p.b);
|
||||||
Q_ASSERT(writeBytes == p.b.size());
|
Q_ASSERT(writeBytes == p.b.size());
|
||||||
|
Q_UNUSED(writeBytes); // For building in release mode.
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -211,9 +211,16 @@ int SshChannelManager::channelCount() const
|
|||||||
|
|
||||||
void SshChannelManager::removeChannel(ChannelIterator it)
|
void SshChannelManager::removeChannel(ChannelIterator it)
|
||||||
{
|
{
|
||||||
Q_ASSERT(it != m_channels.end() && "Unexpected channel lookup failure.");
|
if (it == m_channels.end()) {
|
||||||
|
throw SshClientException(SshInternalError,
|
||||||
|
QLatin1String("Internal error: Unexpected channel lookup failure"));
|
||||||
|
}
|
||||||
const int removeCount = m_sessions.remove(it.value());
|
const int removeCount = m_sessions.remove(it.value());
|
||||||
Q_ASSERT(removeCount == 1 && "Session for channel not found.");
|
if (removeCount != 1) {
|
||||||
|
throw SshClientException(SshInternalError,
|
||||||
|
QString::fromLocal8Bit("Internal error: Unexpected session count %1 for channel.")
|
||||||
|
.arg(removeCount));
|
||||||
|
}
|
||||||
m_channels.erase(it);
|
m_channels.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,10 @@ void SshAbstractCryptoFacility::convert(QByteArray &data, quint32 offset,
|
|||||||
dataSize);
|
dataSize);
|
||||||
quint32 bytesRead = m_pipe->read(reinterpret_cast<byte *>(data.data()) + offset,
|
quint32 bytesRead = m_pipe->read(reinterpret_cast<byte *>(data.data()) + offset,
|
||||||
dataSize, m_pipe->message_count() - 1); // Can't use Pipe::LAST_MESSAGE because of a VC bug.
|
dataSize, m_pipe->message_count() - 1); // Can't use Pipe::LAST_MESSAGE because of a VC bug.
|
||||||
Q_ASSERT(bytesRead == dataSize);
|
if (bytesRead != dataSize) {
|
||||||
|
throw SshClientException(SshInternalError,
|
||||||
|
QLatin1String("Internal error: Botan::Pipe::read() returned unexpected value"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray SshAbstractCryptoFacility::generateMac(const QByteArray &data,
|
QByteArray SshAbstractCryptoFacility::generateMac(const QByteArray &data,
|
||||||
|
|||||||
@@ -455,6 +455,7 @@ void EditorView::goForwardInNavigationHistory()
|
|||||||
SplitterOrView::SplitterOrView(OpenEditorsModel *model)
|
SplitterOrView::SplitterOrView(OpenEditorsModel *model)
|
||||||
{
|
{
|
||||||
Q_ASSERT(model);
|
Q_ASSERT(model);
|
||||||
|
Q_UNUSED(model); // For building in release mode.
|
||||||
m_isRoot = true;
|
m_isRoot = true;
|
||||||
m_layout = new QStackedLayout(this);
|
m_layout = new QStackedLayout(this);
|
||||||
m_view = new EditorView();
|
m_view = new EditorView();
|
||||||
|
|||||||
@@ -353,8 +353,7 @@ QList<MaemoMountSpecification> MaemoMountAndCopyFilesService::mountSpecification
|
|||||||
|
|
||||||
void MaemoMountAndCopyFilesService::doInstall()
|
void MaemoMountAndCopyFilesService::doInstall()
|
||||||
{
|
{
|
||||||
m_copyFacility->copyFiles(connection(), deviceConfiguration(), m_filesToCopy,
|
m_copyFacility->copyFiles(deviceConfiguration(), m_filesToCopy, deployMountPoint());
|
||||||
deployMountPoint());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaemoMountAndCopyFilesService::cancelInstallation()
|
void MaemoMountAndCopyFilesService::cancelInstallation()
|
||||||
|
|||||||
@@ -49,11 +49,9 @@ MaemoRemoteCopyFacility::MaemoRemoteCopyFacility(QObject *parent) :
|
|||||||
|
|
||||||
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
|
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
|
||||||
|
|
||||||
void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
|
void MaemoRemoteCopyFacility::copyFiles(const IDevice::ConstPtr &device,
|
||||||
const IDevice::ConstPtr &device,
|
|
||||||
const QList<DeployableFile> &deployables, const QString &mountPoint)
|
const QList<DeployableFile> &deployables, const QString &mountPoint)
|
||||||
{
|
{
|
||||||
Q_ASSERT(connection->state() == SshConnection::Connected);
|
|
||||||
Q_ASSERT(!m_isCopying);
|
Q_ASSERT(!m_isCopying);
|
||||||
|
|
||||||
m_devConf = device;
|
m_devConf = device;
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ public:
|
|||||||
explicit MaemoRemoteCopyFacility(QObject *parent = 0);
|
explicit MaemoRemoteCopyFacility(QObject *parent = 0);
|
||||||
~MaemoRemoteCopyFacility();
|
~MaemoRemoteCopyFacility();
|
||||||
|
|
||||||
void copyFiles(QSsh::SshConnection *connection,
|
void copyFiles(const ProjectExplorer::IDevice::ConstPtr &device,
|
||||||
const ProjectExplorer::IDevice::ConstPtr &device,
|
|
||||||
const QList<ProjectExplorer::DeployableFile> &deployables, const QString &mountPoint);
|
const QList<ProjectExplorer::DeployableFile> &deployables, const QString &mountPoint);
|
||||||
void cancel();
|
void cancel();
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public:
|
|||||||
if (!version || version->type() != QLatin1String(QtSupport::Constants::DESKTOPQT))
|
if (!version || version->type() != QLatin1String(QtSupport::Constants::DESKTOPQT))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool hasViewer;
|
bool hasViewer = false; // Initialization needed for dumb compilers.
|
||||||
QtSupport::QtVersionNumber minVersion;
|
QtSupport::QtVersionNumber minVersion;
|
||||||
switch (import) {
|
switch (import) {
|
||||||
case QmlProject::UnknownImport:
|
case QmlProject::UnknownImport:
|
||||||
|
|||||||
Reference in New Issue
Block a user