diff options
author | Stephen Hines <srhines@google.com> | 2016-02-12 17:09:04 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2016-02-18 16:56:30 -0800 |
commit | ab70dba4e1c76b6b7b6a1001fae3529b11ca6190 (patch) | |
tree | 5f50efe895f16db3c2bf7a3e5bacf57a0f7a859f /driver | |
parent | 08448afe7ae8b5787cb6733d333d9ef03d992da8 (diff) | |
download | rs-ab70dba4e1c76b6b7b6a1001fae3529b11ca6190.tar.gz |
Clean up warnings for RS runtime libraries.
Bug: http://b/27068813
This change turns on -Wno-deprecated for compilation of just the runtime
libraries (since they need to retain even our deprecated definitions).
It also fixes some issues with "endif" comments. I have also enabled
-Werror for the runtime library compilation, so that we don't trigger
any future problems.
Change-Id: I0771e70f5aeb4be17d4390d57dae97a0aaf560a4
(cherry picked from commit f72e74660567181b79673f2a476a6957db2507e5)
Diffstat (limited to 'driver')
-rw-r--r-- | driver/runtime/build_bc_lib_internal.mk | 4 | ||||
-rw-r--r-- | driver/runtime/rs_allocation.c | 2 | ||||
-rw-r--r-- | driver/runtime/rs_cl.c | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/driver/runtime/build_bc_lib_internal.mk b/driver/runtime/build_bc_lib_internal.mk index 65c022a6..0c9d50a9 100644 --- a/driver/runtime/build_bc_lib_internal.mk +++ b/driver/runtime/build_bc_lib_internal.mk @@ -43,6 +43,9 @@ bc_translated_clang_cc1_cflags := $(addprefix -Xclang , $(bc_clang_cc1_cflags)) # Bug: 25435756 - must be switched back to the proper API level bc_RS_VERSION := -DRS_VERSION=4294967295 +# Disable deprecated warnings, because we have to support even legacy APIs. +bc_warning_flags := -Wno-deprecated -Werror + bc_cflags := -MD \ $(bc_RS_VERSION) \ -std=c99 \ @@ -53,6 +56,7 @@ bc_cflags := -MD \ -target $(BCC_RS_TRIPLE) \ -fsigned-char \ $($(LOCAL_2ND_ARCH_VAR_PREFIX)RS_TRIPLE_CFLAGS) \ + $(bc_warning_flags) \ $(LOCAL_CFLAGS) \ $(bc_translated_clang_cc1_cflags) \ $(LOCAL_CFLAGS_$(my_32_64_bit_suffix)) diff --git a/driver/runtime/rs_allocation.c b/driver/runtime/rs_allocation.c index 415caeb8..9726442a 100644 --- a/driver/runtime/rs_allocation.c +++ b/driver/runtime/rs_allocation.c @@ -619,6 +619,8 @@ rs_element __attribute__((overloadable)) rsCreatePixelElement( case RS_KIND_PIXEL_DEPTH: vector_width = 2; break; + default: + break; } return rsCreateElement(data_type, data_kind, true, vector_width); diff --git a/driver/runtime/rs_cl.c b/driver/runtime/rs_cl.c index 4d28c10c..1dcc23c4 100644 --- a/driver/runtime/rs_cl.c +++ b/driver/runtime/rs_cl.c @@ -624,7 +624,7 @@ extern float __attribute__((overloadable)) SC_powf(float, float); float __attribute__((overloadable)) pow(float v1, float v2) { return SC_powf(v1, v2); } -#endif defined(RS_G_RUNTIME) +#endif // defined(RS_G_RUNTIME) FN_FUNC_FN_FN(pow) extern float __attribute__((overloadable)) pown(float v, int p) { @@ -728,7 +728,7 @@ extern float __attribute__((overloadable)) SC_sqrtf(float); float __attribute__((overloadable)) sqrt(float v) { return SC_sqrtf(v); } -#endif defined(RS_G_RUNTIME) +#endif // defined(RS_G_RUNTIME) FN_FUNC_FN(sqrt) #else |