diff options
author | Stephen Hines <srhines@google.com> | 2011-03-01 17:34:59 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2011-03-03 16:12:43 -0800 |
commit | 1bf1f8df178170ee3d4224f3c92a1b724d783178 (patch) | |
tree | db5f215ea7f56536aab50df6655346ee98cfc116 /libs | |
parent | 3080b85c2ef8846099ae86cd8fea65592a6a591d (diff) | |
download | frameworks_base-1bf1f8df178170ee3d4224f3c92a1b724d783178.zip frameworks_base-1bf1f8df178170ee3d4224f3c92a1b724d783178.tar.gz frameworks_base-1bf1f8df178170ee3d4224f3c92a1b724d783178.tar.bz2 |
DO NOT MERGE: Almost all warnings are now errors in RS build.
Change-Id: Ie4952cdf5c75bf1b7a7899a32b3b1f8747686356
Diffstat (limited to 'libs')
-rw-r--r-- | libs/rs/Android.mk | 3 | ||||
-rw-r--r-- | libs/rs/rsAllocation.cpp | 4 | ||||
-rw-r--r-- | libs/rs/rsContext.cpp | 2 | ||||
-rw-r--r-- | libs/rs/rsHandcode.h | 1 | ||||
-rw-r--r-- | libs/rs/rsScript.cpp | 1 | ||||
-rw-r--r-- | libs/rs/rsScriptC_Lib.cpp | 2 | ||||
-rw-r--r-- | libs/rs/rsScriptC_LibCL.cpp | 2 | ||||
-rw-r--r-- | libs/rs/rsScriptC_LibGL.cpp | 2 |
8 files changed, 12 insertions, 5 deletions
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk index 5ab4804..0836887 100644 --- a/libs/rs/Android.mk +++ b/libs/rs/Android.mk @@ -124,6 +124,8 @@ LOCAL_STATIC_LIBRARIES := libdex libft2 LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik LOCAL_C_INCLUDES += frameworks/compile/libbcc/include +LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable + LOCAL_LDLIBS := -lpthread -ldl LOCAL_MODULE:= libRS LOCAL_MODULE_TAGS := optional @@ -132,6 +134,7 @@ include $(BUILD_SHARED_LIBRARY) # Now build a host version for serialization include $(CLEAR_VARS) +LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable LOCAL_CFLAGS += -DANDROID_RS_SERIALIZE LOCAL_SRC_FILES:= \ diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 54dcbcb..ec03a15 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -21,8 +21,6 @@ #include <GLES/glext.h> #endif //ANDROID_RS_SERIALIZE -static void rsaAllocationGenerateScriptMips(RsContext con, RsAllocation va); - using namespace android; using namespace android::renderscript; @@ -602,6 +600,8 @@ void Allocation::resize2D(Context *rsc, uint32_t dimX, uint32_t dimY) { // #ifndef ANDROID_RS_SERIALIZE +static void rsaAllocationGenerateScriptMips(RsContext con, RsAllocation va); + namespace android { namespace renderscript { diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 2e6ea12..4a5620d 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -741,7 +741,7 @@ Context::~Context() { mWorkers.mLaunchSignals[ct].set(); } for (uint32_t ct = 0; ct < mWorkers.mCount; ct++) { - int status = pthread_join(mWorkers.mThreadId[ct], &res); + status = pthread_join(mWorkers.mThreadId[ct], &res); } rsAssert(!mWorkers.mRunningCount); diff --git a/libs/rs/rsHandcode.h b/libs/rs/rsHandcode.h index 6f21a35..57da10a 100644 --- a/libs/rs/rsHandcode.h +++ b/libs/rs/rsHandcode.h @@ -4,7 +4,6 @@ static inline void rsHCAPI_ContextFinish (RsContext rsc) { ThreadIO *io = &((Context *)rsc)->mIO; uint32_t size = sizeof(RS_CMD_ContextFinish); - RS_CMD_ContextFinish *cmd = static_cast<RS_CMD_ContextFinish *>(io->mToCore.reserve(size)); io->mToCore.commitSync(RS_CMD_ID_ContextFinish, size); } diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp index 9ada9c2..afee2a3 100644 --- a/libs/rs/rsScript.cpp +++ b/libs/rs/rsScript.cpp @@ -139,7 +139,6 @@ void rsi_ScriptSetVarD(Context *rsc, RsScript vs, uint32_t slot, double value) { } void rsi_ScriptSetVarV(Context *rsc, RsScript vs, uint32_t slot, const void *data, uint32_t len) { - const float *fp = (const float *)data; Script *s = static_cast<Script *>(vs); s->setVar(slot, data, len); } diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index 80da8ae..7c64184 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -35,6 +35,7 @@ using namespace android::renderscript; // Math routines ////////////////////////////////////////////////////////////////////////////// +#if 0 static float SC_sinf_fast(float x) { const float A = 1.0f / (2.0f * M_PI); const float B = -16.0f; @@ -70,6 +71,7 @@ static float SC_cosf_fast(float x) { const float y = B * x * fabsf(x) + C * x; return 0.2215f * (y * fabsf(y) - y) + y; } +#endif static float SC_randf(float max) { float r = (float)rand(); diff --git a/libs/rs/rsScriptC_LibCL.cpp b/libs/rs/rsScriptC_LibCL.cpp index 57855db..8a0aa47 100644 --- a/libs/rs/rsScriptC_LibCL.cpp +++ b/libs/rs/rsScriptC_LibCL.cpp @@ -42,6 +42,7 @@ static float SC_mad(float v1, float v2, float v3) { return v1 * v2 + v3; } +#if 0 static float SC_pown(float v, int p) { return powf(v, (float)p); } @@ -49,6 +50,7 @@ static float SC_pown(float v, int p) { static float SC_powr(float v, float p) { return powf(v, p); } +#endif float SC_rootn(float v, int r) { return pow(v, 1.f / r); diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp index 48a0969..15426bc 100644 --- a/libs/rs/rsScriptC_LibGL.cpp +++ b/libs/rs/rsScriptC_LibGL.cpp @@ -281,11 +281,13 @@ static void SC_allocationSyncAll(RsAllocation va) { static_cast<Allocation *>(va)->syncAll(rsc, RS_ALLOCATION_USAGE_SCRIPT); } +#if 0 static void SC_allocationSyncAll2(RsAllocation va, RsAllocationUsageType source) { CHECK_OBJ(va); GET_TLS(); static_cast<Allocation *>(va)->syncAll(rsc, source); } +#endif static void SC_ClearColor(float r, float g, float b, float a) { GET_TLS(); |