diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-11-16 03:33:00 +0059 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-07-10 20:08:05 +0100 |
commit | 531ea6d1139f46910b09cdd76e8f0fb8d450fe2a (patch) | |
tree | 8b8db21e5cdb7c7aa84d1b7ba33af51293a22c30 /vm/reflect/Annotation.cpp | |
parent | b6accc69d0faafed89513b9669a8788b652e9e95 (diff) | |
download | android_dalvik-531ea6d1139f46910b09cdd76e8f0fb8d450fe2a.tar.gz android_dalvik-531ea6d1139f46910b09cdd76e8f0fb8d450fe2a.tar.bz2 android_dalvik-531ea6d1139f46910b09cdd76e8f0fb8d450fe2a.zip |
dalvik: Fix various compile failures with gcc 4.6
This fixes numerous compile errors with gcc 4.6, and combinations
of -DNDEBUG, -DLOG_NDEBUG resulting in variables being defined but
not used - resulting in a compiler warning (or build breakage
with -Werror).
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
dalvik: Fix aliasing violation
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
dalvik/libdex: Change to -O2 if we're building with -O3
This is a workaround for an apparent gcc bug.
https://bugs.launchpad.net/linaro-android/+bug/948255
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
dalvik: Fix build with ISO C++11
Fixes some confusion between jchar and the new char16_t
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Diffstat (limited to 'vm/reflect/Annotation.cpp')
-rw-r--r-- | vm/reflect/Annotation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vm/reflect/Annotation.cpp b/vm/reflect/Annotation.cpp index 233db0881..7a1cbca59 100644 --- a/vm/reflect/Annotation.cpp +++ b/vm/reflect/Annotation.cpp @@ -598,6 +598,10 @@ static Object* convertReturnType(Object* valueObj, ClassObject* methodReturn) } ALOGV("HEY: converting valueObj from [%s to [%s", srcElemClass->descriptor, dstElemClass->descriptor); +#ifdef LOG_NDEBUG + // variable defined but not used => breakage on -Werror + (void)srcElemClass; +#endif ArrayObject* srcArray = (ArrayObject*) valueObj; u4 length = srcArray->length; @@ -1101,9 +1105,9 @@ static const u1* searchEncodedAnnotation(const ClassObject* clazz, const u1* ptr, const char* name) { DexFile* pDexFile = clazz->pDvmDex->pDexFile; - u4 typeIdx, size; + u4 /*typeIdx,*/ size; - typeIdx = readUleb128(&ptr); + /*typeIdx =*/ readUleb128(&ptr); size = readUleb128(&ptr); //printf("##### searching ptr=%p type=%u size=%u\n", ptr, typeIdx, size); |