From d52f3747683184beac66bde6feea7ac6f8bf783e Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 28 Nov 2014 13:55:24 -0800 Subject: Move back to C++98. This code depends on narrowing hex literals to a signed long, which trips -Wc++11-narrowing (the fix would be to explicitly cast each value to signed). Change-Id: I581a02ef0eeee5a2d95ce0ff2ec6f7ff26f3a074 --- Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Android.mk b/Android.mk index 9e56a2d..dcf8cf6 100644 --- a/Android.mk +++ b/Android.mk @@ -39,7 +39,6 @@ LOCAL_SRC_FILES := \ $(sbrdec_sources:%=libSBRdec/src/%) \ $(sbrenc_sources:%=libSBRenc/src/%) -LOCAL_CFLAGS := -DANDROID LOCAL_CFLAGS += -Wno-sequence-point -Wno-extra LOCAL_C_INCLUDES := \ @@ -58,6 +57,8 @@ LOCAL_C_INCLUDES := \ LOCAL_CLANG_CPPFLAGS += \ -Wno-pointer-bool-conversion +LOCAL_CPPFLAGS += -std=c++98 + LOCAL_MODULE:= libFraunhoferAAC include $(BUILD_STATIC_LIBRARY) -- cgit v1.2.3 From bb1e78a118cab7358b4f5e0cd5c8c21d95576936 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 12 Nov 2014 10:09:10 -0800 Subject: Fix checks for {Front,Side,Back}ElementIsCpe {Front,Side,Back}ElementIsCpe is an array (per-channel). The check for pPce->{Front,Side,Back}ElementIsCpe without an index checks the address of the array, and will always evaluate to true. The elTagSce++ statements are unreachable. Change-Id: If530371788a44038c500d6f9f7ac67681f77cc71 --- Android.mk | 4 ---- libMpegTPDec/src/tpdec_asc.cpp | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Android.mk b/Android.mk index dcf8cf6..cfd5113 100644 --- a/Android.mk +++ b/Android.mk @@ -52,10 +52,6 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/libSBRdec/include \ $(LOCAL_PATH)/libSBRenc/include -# In tpdec_asc.cpp: address of array 'pPce->FrontElementIsCpe' -# will always evaluate to 'true'. -LOCAL_CLANG_CPPFLAGS += \ - -Wno-pointer-bool-conversion LOCAL_CPPFLAGS += -std=c++98 diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp index 82adec1..bae271e 100644 --- a/libMpegTPDec/src/tpdec_asc.cpp +++ b/libMpegTPDec/src/tpdec_asc.cpp @@ -449,13 +449,13 @@ void CProgramConfig_GetDefault( CProgramConfig *pPce, int el, elTagSce = 0, elTagCpe = 0; for (el = 0; el < pPce->NumFrontChannelElements; el += 1) { - pPce->FrontElementTagSelect[el] = (pPce->FrontElementIsCpe) ? elTagCpe++ : elTagSce++; + pPce->FrontElementTagSelect[el] = (pPce->FrontElementIsCpe[el]) ? elTagCpe++ : elTagSce++; } for (el = 0; el < pPce->NumSideChannelElements; el += 1) { - pPce->SideElementTagSelect[el] = (pPce->SideElementIsCpe) ? elTagCpe++ : elTagSce++; + pPce->SideElementTagSelect[el] = (pPce->SideElementIsCpe[el]) ? elTagCpe++ : elTagSce++; } for (el = 0; el < pPce->NumBackChannelElements; el += 1) { - pPce->BackElementTagSelect[el] = (pPce->BackElementIsCpe) ? elTagCpe++ : elTagSce++; + pPce->BackElementTagSelect[el] = (pPce->BackElementIsCpe[el]) ? elTagCpe++ : elTagSce++; } elTagSce = 0; for (el = 0; el < pPce->NumLfeChannelElements; el += 1) { -- cgit v1.2.3 From 355baa79bfc5f389023428ca8097f56185144882 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Tue, 10 Feb 2015 15:39:28 -0800 Subject: Use gcc for the AAC decoder clang generates crashing code for this. Change-Id: I90355d6735403290e7c0d93ff4854520b7b80f4a --- Android.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Android.mk b/Android.mk index cfd5113..630f0fe 100644 --- a/Android.mk +++ b/Android.mk @@ -57,4 +57,6 @@ LOCAL_CPPFLAGS += -std=c++98 LOCAL_MODULE:= libFraunhoferAAC +LOCAL_CLANG:= false + include $(BUILD_STATIC_LIBRARY) -- cgit v1.2.3 From 09f1d0446737492f2f6e3ec5b668ba6ebf730ab5 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 12 Feb 2015 10:31:26 -0800 Subject: Do not include genericStds_linux.cpp. The __aeabi_memcpy functions are already defined in Android libc. Redefining them to call memcpy will become recursive when clang/llvm converts the memcpy call to __aeabi_memcpy. With this change, we can enable clang/llvm by removing LOCAL_CLANG from Android.mk. BUG: 12216385 Change-Id: I8b8b4ba7f3ff1e66f8110fc3b6356865a582c1d8 --- Android.mk | 2 -- libSYS/src/genericStds.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Android.mk b/Android.mk index 630f0fe..cfd5113 100644 --- a/Android.mk +++ b/Android.mk @@ -57,6 +57,4 @@ LOCAL_CPPFLAGS += -std=c++98 LOCAL_MODULE:= libFraunhoferAAC -LOCAL_CLANG:= false - include $(BUILD_STATIC_LIBRARY) diff --git a/libSYS/src/genericStds.cpp b/libSYS/src/genericStds.cpp index 3381e37..72b5467 100644 --- a/libSYS/src/genericStds.cpp +++ b/libSYS/src/genericStds.cpp @@ -116,7 +116,7 @@ amm-info@iis.fraunhofer.de /* Include OS/System specific implementations. */ -#if defined(__linux__) /* cppp replaced: elif */ +#if defined(__linux__) && !defined(__ANDROID__) /* cppp replaced: elif */ #include "linux/genericStds_linux.cpp" #endif -- cgit v1.2.3