Fixed gcc4 warnings

This commit is contained in:
Srivats P. 2015-06-05 20:18:41 +05:30
parent 0bec1cfdf8
commit d677b09491
5 changed files with 12 additions and 9 deletions

View File

@ -41,7 +41,7 @@ protected:
return filterRegExp().exactMatch(user) ? true : false;
}
bool filterAcceptsRow(int sourceRow,
const QModelIndex &sourceParent) const
const QModelIndex &/*sourceParent*/) const
{
// Hide row 0 - username (needed only by this filter class)
return (sourceRow > 0) ? true : false;

View File

@ -77,7 +77,7 @@ void Updater::responseReceived(QHttpResponseHeader response)
response.statusCode(), qPrintable(response.reasonPhrase()));
}
void Updater::parseXml(int id, bool error)
void Updater::parseXml(int /*id*/, bool error)
{
QXmlStreamReader xml;
QString newVersion;

View File

@ -46,8 +46,8 @@ PythonFileFormat::~PythonFileFormat()
// Nothing to do
}
bool PythonFileFormat::openStreams(const QString fileName,
OstProto::StreamConfigList &streams, QString &error)
bool PythonFileFormat::openStreams(const QString /*fileName*/,
OstProto::StreamConfigList &/*streams*/, QString &/*error*/)
{
// NOT SUPPORTED!
return false;
@ -219,10 +219,13 @@ bool PythonFileFormat::saveStreams(const OstProto::StreamConfigList streams,
return true;
_open_fail:
error = QString(tr("Error opening %1 (Error Code = %2)"))
.arg(fileName)
.arg(file.error());
return false;
}
bool PythonFileFormat::isMyFileFormat(const QString fileName)
bool PythonFileFormat::isMyFileFormat(const QString /*fileName*/)
{
// isMyFileFormat() is used for file open case to detect
// file format - Open not supported for Python Scripts

View File

@ -29,14 +29,14 @@ protobuf_impl.name = protobuf implementation
protobuf_impl.input = PROTOS
protobuf_impl.output = ${QMAKE_FILE_BASE}.pb.cc
protobuf_impl.depends = ${QMAKE_FILE_BASE}.pb.h
protobuf_impl.commands = $$escape_expand(\n)
protobuf_impl.commands = $$escape_expand(\\n)
protobuf_impl.variable_out = GENERATED_SOURCES
QMAKE_EXTRA_COMPILERS += protobuf_impl
protobuf_py.name = protobuf python binding
protobuf_py.input = PROTOS
protobuf_py.output = ../binding/protocols/${QMAKE_FILE_BASE}_pb2.py
protobuf_py.commands = $$escape_expand(\n)
protobuf_py.commands = $$escape_expand(\\n)
#protobuf_py.commands = protoc --python_out="../binding/protocols" $${PROTOPATHS} ${QMAKE_FILE_NAME}
protobuf_py.variable_out = GENERATED_FILES
QMAKE_EXTRA_COMPILERS += protobuf_py

View File

@ -208,7 +208,7 @@ _top:
{
static quint32 cumLen = 0;
QIODevice *blob;
int l;
int l = 0;
blob = static_cast<PbRpcController*>(controller)->binaryBlob();
Q_ASSERT(blob != NULL);
@ -294,7 +294,7 @@ _top:
{
static quint32 cumLen = 0;
static QByteArray error;
int l;
int l = 0;
while (cumLen < len)
{