diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-03-04 12:29:03 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-05 13:14:10 +0100 |
commit | 7e87bf0bb7dd5b64fca0fedce046d7ab0475a4c6 (patch) | |
tree | 5124f2f9f28663403c81779cda612c1f939dc725 /src | |
parent | 6269e4fafc882b9727fe06b405b876af99060d8c (diff) |
Fix MSVC2012 compiler warnings.
Tested on both win32 and win64.
Change-Id: I47755e2da51829e61e1452eaaf84a057224b478b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/masm/disassembler/udis86/udis86_decode.c | 2 | ||||
-rw-r--r-- | src/3rdparty/masm/wtf/OSAllocatorWin.cpp | 1 | ||||
-rw-r--r-- | src/qml/compiler/qqmltypecompiler_p.h | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 5 | ||||
-rw-r--r-- | src/qml/compiler/qv4jsir_p.h | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 8 |
6 files changed, 14 insertions, 6 deletions
diff --git a/src/3rdparty/masm/disassembler/udis86/udis86_decode.c b/src/3rdparty/masm/disassembler/udis86/udis86_decode.c index 2ebd56b2a9..8bec56e470 100644 --- a/src/3rdparty/masm/disassembler/udis86/udis86_decode.c +++ b/src/3rdparty/masm/disassembler/udis86/udis86_decode.c @@ -723,7 +723,7 @@ decode_operand(struct ud *u, case OP_rSI: case OP_rDI: operand->type = UD_OP_REG; - operand->base = resolve_gpr64(u, type, &operand->size); + operand->base = resolve_gpr64(u, type, (enum ud_operand_size*)(&operand->size)); break; case OP_ALr8b: case OP_CLr9b: diff --git a/src/3rdparty/masm/wtf/OSAllocatorWin.cpp b/src/3rdparty/masm/wtf/OSAllocatorWin.cpp index 78300dc715..f95a4841c6 100644 --- a/src/3rdparty/masm/wtf/OSAllocatorWin.cpp +++ b/src/3rdparty/masm/wtf/OSAllocatorWin.cpp @@ -72,6 +72,7 @@ void OSAllocator::decommit(void* address, size_t bytes) void OSAllocator::releaseDecommitted(void* address, size_t bytes) { + (void) bytes; // suppress unused formal parameter warning // According to http://msdn.microsoft.com/en-us/library/aa366892(VS.85).aspx, // dwSize must be 0 if dwFreeType is MEM_RELEASE. bool result = VirtualFree(address, 0, MEM_RELEASE); diff --git a/src/qml/compiler/qqmltypecompiler_p.h b/src/qml/compiler/qqmltypecompiler_p.h index 62c0ae81ef..405438c0ab 100644 --- a/src/qml/compiler/qqmltypecompiler_p.h +++ b/src/qml/compiler/qqmltypecompiler_p.h @@ -221,7 +221,7 @@ protected: QVector<int> componentRoots; // indices of objects that are the beginning of a new component // scope. This is sorted and used for binary search. - QVector<int> componentBoundaries; + QVector<quint32> componentBoundaries; int _componentIndex; QHash<int, int> _idToObjectIndex; diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 1f6bdfb2cf..026ce630d2 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -69,6 +69,9 @@ struct Location { qint32 line; qint32 column; + + Location(): line(-1), column(-1) {} + inline bool operator<(const Location &other) const { return line < other.line || (line == other.line && column < other.column); @@ -506,6 +509,8 @@ struct Import qint32 minorVersion; Location location; + + Import(): type(0), uriIndex(0), qualifierIndex(0), majorVersion(0), minorVersion(0) {} }; struct QmlUnit diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h index 58a569b862..9b720ba6a2 100644 --- a/src/qml/compiler/qv4jsir_p.h +++ b/src/qml/compiler/qv4jsir_p.h @@ -275,6 +275,8 @@ struct ExprList { Expr *expr; ExprList *next; + ExprList(): expr(0), next(0) {} + void init(Expr *expr, ExprList *next = 0) { this->expr = expr; diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index c65c80ebd3..8a430c15a2 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -2683,7 +2683,7 @@ void Renderer::visualizeOverdraw_helper(Node *node) shader->setUniformValue(shader->matrix, matrix); QColor color = node->element()->batch->isOpaque ? QColor::fromRgbF(0.3, 1.0, 0.3) : QColor::fromRgbF(1.0, 0.3, 0.3); - float ca = 0.33; + float ca = 0.33f; shader->setUniformValue(shader->color, color.redF() * ca, color.greenF() * ca, color.blueF() * ca, ca); visualizeDrawGeometry(gn->geometry()); @@ -2705,7 +2705,7 @@ void Renderer::visualizeOverdraw() glBlendFunc(GL_ONE, GL_ONE); static float step = 0; - step += M_PI * 2 / 1000.; + step += static_cast<float>(M_PI * 2 / 1000.); if (step > M_PI * 2) step = 0; float angle = 80.0 * sin(step); @@ -2796,7 +2796,7 @@ void Renderer::visualize() glEnableVertexAttribArray(0); // Blacken out the actual rendered content... - float bgOpacity = 0.8; + float bgOpacity = 0.8f; if (m_visualizeMode == VisualizeBatches) bgOpacity = 1.0; float v[] = { -1, 1, 1, 1, -1, -1, 1, -1 }; @@ -2814,7 +2814,7 @@ void Renderer::visualize() } else if (m_visualizeMode == VisualizeClipping) { QRect viewport = viewportRect(); shader->setUniformValue(shader->tweak, viewport.width(), viewport.height(), 0.5, 0); - shader->setUniformValue(shader->color, 0.2, 0, 0, 0.2); + shader->setUniformValue(shader->color, GLfloat(0.2), 0, 0, GLfloat(0.2)); visualizeClipping(rootNode()); } else if (m_visualizeMode == VisualizeChanges) { visualizeChanges(m_nodes.value(rootNode())); |