diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-11-01 12:38:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-04 02:16:04 +0100 |
commit | a79e400150e9d550cc4ddc0c0497778d8b78fe5d (patch) | |
tree | 5a66670d4c31aaf0d356042b6fe607728e237b5b /src/qml/compiler/qv4compileddata.cpp | |
parent | b5991ce2a61219bda5a7fa6e33f323158d1eb78b (diff) |
Fix various compiler warnings in order to remove warn_off in the near future
Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 0f5c1857c8..51f39e7e6c 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -55,13 +55,6 @@ namespace QV4 { namespace CompiledData { -namespace { - bool functionSortHelper(QV4::Function *lhs, QV4::Function *rhs) - { - return reinterpret_cast<quintptr>(lhs->codePtr) < reinterpret_cast<quintptr>(rhs->codePtr); - } -} - CompilationUnit::~CompilationUnit() { unlink(); @@ -77,13 +70,13 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) runtimeStrings = (QV4::SafeString *)malloc(data->stringTableSize * sizeof(QV4::SafeString)); // memset the strings to 0 in case a GC run happens while we're within the loop below memset(runtimeStrings, 0, data->stringTableSize * sizeof(QV4::SafeString)); - for (int i = 0; i < data->stringTableSize; ++i) + for (uint i = 0; i < data->stringTableSize; ++i) runtimeStrings[i] = engine->newIdentifier(data->stringAt(i)); runtimeRegularExpressions = new QV4::SafeValue[data->regexpTableSize]; // memset the regexps to 0 in case a GC run happens while we're within the loop below memset(runtimeRegularExpressions, 0, data->regexpTableSize * sizeof(QV4::SafeValue)); - for (int i = 0; i < data->regexpTableSize; ++i) { + for (uint i = 0; i < data->regexpTableSize; ++i) { const CompiledData::RegExp *re = data->regexpAt(i); int flags = 0; if (re->flags & CompiledData::RegExp::RegExp_Global) @@ -109,8 +102,8 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) else if (compiledLookups[i].type_and_flags == CompiledData::Lookup::Type_GlobalGetter) l->globalGetter = QV4::Lookup::globalGetterGeneric; - for (int i = 0; i < QV4::Lookup::Size; ++i) - l->classList[i] = 0; + for (int j = 0; j < QV4::Lookup::Size; ++j) + l->classList[j] = 0; l->level = -1; l->index = UINT_MAX; l->name = runtimeStrings[compiledLookups[i].nameIndex].asString(); @@ -120,7 +113,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) if (data->jsClassTableSize) { runtimeClasses = (QV4::InternalClass**)malloc(data->jsClassTableSize * sizeof(QV4::InternalClass*)); - for (int i = 0; i < data->jsClassTableSize; ++i) { + for (uint i = 0; i < data->jsClassTableSize; ++i) { int memberCount = 0; const CompiledData::JSClassMember *member = data->jsClassAt(i, &memberCount); QV4::InternalClass *klass = engine->objectClass; @@ -167,17 +160,17 @@ void CompilationUnit::unlink() void CompilationUnit::markObjects() { - for (int i = 0; i < data->stringTableSize; ++i) + for (uint i = 0; i < data->stringTableSize; ++i) runtimeStrings[i].mark(); if (runtimeRegularExpressions) { - for (int i = 0; i < data->regexpTableSize; ++i) + for (uint i = 0; i < data->regexpTableSize; ++i) runtimeRegularExpressions[i].mark(); } for (int i = 0; i < runtimeFunctions.count(); ++i) if (runtimeFunctions[i]) runtimeFunctions[i]->mark(); if (runtimeLookups) { - for (int i = 0; i < data->lookupTableSize; ++i) + for (uint i = 0; i < data->lookupTableSize; ++i) runtimeLookups[i].name->mark(); } } |