From 886c359ebb86afcad3a62ce6cf7697fd7d6a1ea8 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 11 Oct 2013 13:22:19 +0200 Subject: Fix build on Android with -developer-build That configuration implies -Werror for some kind of warnings. This patch fixes * Mix of different types in conditional (qv4isel_masm.cpp) * Noreturn function returning instead of calling another noreturn function at the end (qv4engine_cxxabi.cpp) * An out-of-line function being declared inline Task-Number: QTBUG-33998 Change-Id: I3ba58dcadeac6774c5de63e6bb551354a2f23332 Reviewed-by: Lars Knoll --- src/qml/compiler/qv4isel_masm.cpp | 4 ++-- src/qml/jsruntime/qv4engine_cxxabi.cpp | 1 + src/qml/jsruntime/qv4value_def_p.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp index 6fb8393f54..574b4e278b 100644 --- a/src/qml/compiler/qv4isel_masm.cpp +++ b/src/qml/compiler/qv4isel_masm.cpp @@ -2239,8 +2239,8 @@ bool InstructionSelection::visitCJumpStrictNullUndefined(V4IR::Type nullOrUndef, Assembler::RelationalCondition cond = binop->op == V4IR::OpStrictEqual ? Assembler::Equal : Assembler::NotEqual; - const Assembler::TrustedImm32 tag(nullOrUndef == V4IR::NullType ? QV4::Value::_Null_Type - : QV4::Value::Undefined_Type); + const Assembler::TrustedImm32 tag(nullOrUndef == V4IR::NullType ? int(QV4::Value::_Null_Type) + : int(QV4::Value::Undefined_Type)); _as->generateCJumpOnCompare(cond, tagReg, tag, _block, trueBlock, falseBlock); return true; } diff --git a/src/qml/jsruntime/qv4engine_cxxabi.cpp b/src/qml/jsruntime/qv4engine_cxxabi.cpp index 6141753ccc..02a6b9bdde 100644 --- a/src/qml/jsruntime/qv4engine_cxxabi.cpp +++ b/src/qml/jsruntime/qv4engine_cxxabi.cpp @@ -131,6 +131,7 @@ void ExecutionEngine::rethrowInternal() globals->caughtExceptions = 0; _Unwind_RaiseException(&exception->unwindHeader); + std::terminate(); } QT_END_NAMESPACE diff --git a/src/qml/jsruntime/qv4value_def_p.h b/src/qml/jsruntime/qv4value_def_p.h index c8d03cfeed..82f8d02dfe 100644 --- a/src/qml/jsruntime/qv4value_def_p.h +++ b/src/qml/jsruntime/qv4value_def_p.h @@ -242,7 +242,7 @@ struct Q_QML_EXPORT Value void setDouble(double d) { dbl = d; } bool isNaN() const { return (tag & QV4::Value::NotDouble_Mask) == QV4::Value::NaN_Mask; } #endif - inline bool isString() const; + bool isString() const; inline bool isObject() const; inline bool isInt32() { if (tag == _Integer_Type) -- cgit v1.2.3