summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-10-07 07:44:18 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-10-07 10:44:41 (GMT)
commit41a47906475f3970bd662c3d24e7e642ea65a191 (patch)
treebda10c4b1885e7754481749626b5dcbe5362c07a
parent350410f19fd589986e51eba8f018abd92eddc287 (diff)
downloadQt-41a47906475f3970bd662c3d24e7e642ea65a191.zip
Qt-41a47906475f3970bd662c3d24e7e642ea65a191.tar.gz
Qt-41a47906475f3970bd662c3d24e7e642ea65a191.tar.bz2
Fixing some GCC warnings
Reviewed-by: Markus Goetz
-rw-r--r--demos/browser/webview.cpp2
-rw-r--r--demos/sub-attaq/graphicsscene.cpp2
-rw-r--r--examples/richtext/textobject/svgtextobject.cpp4
-rw-r--r--src/corelib/thread/qthread_unix.cpp1
-rw-r--r--src/dbus/qdbusintegrator.cpp1
-rw-r--r--src/gui/painting/qpaintengineex.cpp2
-rw-r--r--src/opengl/qpixmapdata_gl.cpp2
-rw-r--r--src/xmlpatterns/data/qvaluefactory.cpp2
-rw-r--r--src/xmlpatterns/functions/qsequencefns_p.h1
-rw-r--r--src/xmlpatterns/schema/qxsdschemaparser.cpp1
10 files changed, 11 insertions, 7 deletions
diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp
index e1d9b12..754fedc 100644
--- a/demos/browser/webview.cpp
+++ b/demos/browser/webview.cpp
@@ -151,6 +151,8 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
QFile file(QLatin1String(":/notfound.html"));
bool isOpened = file.open(QIODevice::ReadOnly);
Q_ASSERT(isOpened);
+ Q_UNUSED(isOpened)
+
QString title = tr("Error loading page: %1").arg(reply->url().toString());
QString html = QString(QLatin1String(file.readAll()))
.arg(title)
diff --git a/demos/sub-attaq/graphicsscene.cpp b/demos/sub-attaq/graphicsscene.cpp
index 812eadf..e29095e 100644
--- a/demos/sub-attaq/graphicsscene.cpp
+++ b/demos/sub-attaq/graphicsscene.cpp
@@ -129,7 +129,7 @@ void GraphicsScene::setupScene(QAction *newAction, QAction *quitAction)
{
static const int nLetters = 10;
static struct {
- char *pix;
+ char const *pix;
qreal initX, initY;
qreal destX, destY;
} logoData[nLetters] = {
diff --git a/examples/richtext/textobject/svgtextobject.cpp b/examples/richtext/textobject/svgtextobject.cpp
index f5810b6..cf0b0ba 100644
--- a/examples/richtext/textobject/svgtextobject.cpp
+++ b/examples/richtext/textobject/svgtextobject.cpp
@@ -46,7 +46,7 @@
#include "window.h"
//![0]
-QSizeF SvgTextObject::intrinsicSize(QTextDocument *doc, int posInDocument,
+QSizeF SvgTextObject::intrinsicSize(QTextDocument * /*doc*/, int /*posInDocument*/,
const QTextFormat &format)
{
QImage bufferedImage = qVariantValue<QImage>(format.property(Window::SvgData));
@@ -61,7 +61,7 @@ QSizeF SvgTextObject::intrinsicSize(QTextDocument *doc, int posInDocument,
//![1]
void SvgTextObject::drawObject(QPainter *painter, const QRectF &rect,
- QTextDocument *doc, int posInDocument,
+ QTextDocument * /*doc*/, int /*posInDocument*/,
const QTextFormat &format)
{
QImage bufferedImage = qVariantValue<QImage>(format.property(Window::SvgData));
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index c590553..21b5e65 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -624,6 +624,7 @@ void QThread::setTerminationEnabled(bool enabled)
Q_ASSERT_X(thr != 0, "QThread::setTerminationEnabled()",
"Current thread was not started with QThread.");
#ifndef Q_OS_SYMBIAN
+ Q_UNUSED(thr)
pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, NULL);
if (enabled)
pthread_testcancel();
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 8143cba..fb2dd77 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -923,6 +923,7 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
static const bool threads = q_dbus_threads_init_default();
static const int debugging = ::isDebugging = qgetenv("QDBUS_DEBUG").toInt();
Q_UNUSED(threads)
+ Q_UNUSED(debugging)
#ifdef QDBUS_THREAD_DEBUG
if (debugging > 1)
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index d712669..195be0a 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -932,7 +932,7 @@ void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con
fill(path, brush);
}
-void QPaintEngineEx::drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints)
+void QPaintEngineEx::drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints /*hints*/)
{
qreal oldOpacity = state()->opacity;
QTransform oldTransform = state()->matrix;
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index ae4bed0..cbb310b 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -318,7 +318,7 @@ void QGLPixmapData::ensureCreated() const
}
void QGLPixmapData::fromImage(const QImage &image,
- Qt::ImageConversionFlags flags)
+ Qt::ImageConversionFlags /*flags*/)
{
if (image.size() == QSize(w, h))
setSerialNumber(++qt_gl_pixmap_serial);
diff --git a/src/xmlpatterns/data/qvaluefactory.cpp b/src/xmlpatterns/data/qvaluefactory.cpp
index bac53b2..8f7e5a3 100644
--- a/src/xmlpatterns/data/qvaluefactory.cpp
+++ b/src/xmlpatterns/data/qvaluefactory.cpp
@@ -66,7 +66,7 @@ public:
}
AtomicValue::Ptr operator()(const AtomicValue::Ptr &lexicalValue,
- const SchemaType::Ptr &type,
+ const SchemaType::Ptr & /*type*/,
const ReportContext::Ptr &context)
{
prepareCasting(context, BuiltinTypes::xsString);
diff --git a/src/xmlpatterns/functions/qsequencefns_p.h b/src/xmlpatterns/functions/qsequencefns_p.h
index e406b95..fa799d3 100644
--- a/src/xmlpatterns/functions/qsequencefns_p.h
+++ b/src/xmlpatterns/functions/qsequencefns_p.h
@@ -149,7 +149,6 @@ namespace QPatternist
// RVCT doesn't like using template parameter in trinary operator when the trinary operator result is
// passed directly into another constructor.
Q_ASSERT(Id == IDExistsFN || Id == IDEmptyFN);
-
const Expression::Ptr me(FunctionCall::compress(context));
diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp
index 8f7b6af..41c6b82 100644
--- a/src/xmlpatterns/schema/qxsdschemaparser.cpp
+++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp
@@ -123,6 +123,7 @@ class ElementNamespaceHandler
: m_parser(parser)
{
Q_ASSERT(m_parser->isStartElement() && (XsdSchemaToken::toToken(m_parser->name()) == tag) && (XsdSchemaToken::toToken(m_parser->namespaceUri()) == XsdSchemaToken::XML_NS_SCHEMA_URI));
+ Q_UNUSED(tag)
m_parser->m_namespaceSupport.pushContext();
m_parser->m_namespaceSupport.setPrefixes(m_parser->namespaceDeclarations());
}