Fix some compiler warnings.

Change-Id: I5e2c87581d4c309490f12accfff32418700fbb71
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
Erik Verbruggen 2013-01-08 12:57:45 +01:00 committed by Simon Hausmann
parent f5b31970de
commit 65357da128
4 changed files with 7 additions and 4 deletions

View File

@ -159,7 +159,7 @@ int executeLLVMCode(void *codePtr)
void (*code)(VM::ExecutionContext *) = (void (*)(VM::ExecutionContext *)) codePtr;
QScopedPointer<QQmlJS::EvalISelFactory> iSelFactory(new QQmlJS::Moth::ISelFactory);
VM::ExecutionEngine vm(0, iSelFactory.data());
VM::ExecutionEngine vm(iSelFactory.data());
VM::ExecutionContext *ctx = vm.rootContext;
QQmlJS::VM::Object *globalObject = vm.globalObject.objectValue();

View File

@ -125,8 +125,8 @@ struct Value
};
inline ValueType type() const {
return (ValueType)(tag & Type_Mask);
inline unsigned type() const {
return tag & Type_Mask;
}
inline bool isUndefined() const { return tag == _Undefined_Type; }

View File

@ -165,7 +165,7 @@ Managed *MemoryManager::alloc(std::size_t size)
void MemoryManager::scribble(Managed *obj, int c, int size) const
{
if (m_d->scribble)
::memset(obj + 1, c, size - sizeof(Managed));
::memset((void *)(obj + 1), c, size - sizeof(Managed));
}
std::size_t MemoryManager::mark(const QVector<Object *> &objects)

3
v4.pro
View File

@ -64,6 +64,8 @@ INCLUDEPATH += \
$$system($$LLVM_CONFIG --includedir)
QMAKE_CXXFLAGS += $$system($$LLVM_CONFIG --cppflags) -fvisibility-inlines-hidden
QMAKE_CXXFLAGS -= -pedantic
QMAKE_CXXFLAGS -= -Wcovered-switch-default
LIBS += \
$$system($$LLVM_CONFIG --ldflags) \
@ -72,6 +74,7 @@ LIBS += \
QMAKE_EXTRA_TARGETS += gen_llvm_runtime
GEN_LLVM_RUNTIME_FLAGS = $$system($$LLVM_CONFIG --cppflags)
GEN_LLVM_RUNTIME_FLAGS -= -pedantic
gen_llvm_runtime.target = llvm_runtime
gen_llvm_runtime.commands = clang -O2 -emit-llvm -c $(INCPATH) $$GEN_LLVM_RUNTIME_FLAGS -DQMLJS_LLVM_RUNTIME llvm_runtime.cpp -o llvm_runtime.bc