aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kosiński <krzysio@google.com>2023-10-03 02:26:22 +0000
committerKrzysztof Kosiński <krzysio@google.com>2023-10-07 02:14:43 +0000
commit743ab73c152fa056b3a2c222c11c6f61d4b9edbc (patch)
tree124c7e9f5ba1b79387f9436ed1390ab211e7a0fd
parente40898a5b1d0d6d38c9d5256b9e968def5226c8b (diff)
downloadlibnativehelper-743ab73c152fa056b3a2c222c11c6f61d4b9edbc.tar.gz
Remove deprecated constexpr storage from test.
Attempting to define constexpr variables in the .cpp file triggers -Wdeprecated. This warning is currently force-disabled in the global config, but we want to enable it. Bug: 241601211 Test: m checkbuild, presubmit Change-Id: Id53d6d97f917f5ebf8af3d385bd8c2e744f945f8
-rw-r--r--tests/JniSafeRegisterNativeMethods_test.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/JniSafeRegisterNativeMethods_test.cpp b/tests/JniSafeRegisterNativeMethods_test.cpp
index e7b0fc4..00571c2 100644
--- a/tests/JniSafeRegisterNativeMethods_test.cpp
+++ b/tests/JniSafeRegisterNativeMethods_test.cpp
@@ -14,24 +14,12 @@
* limitations under the License.
*/
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wused-but-marked-unused"
-#pragma clang diagnostic ignored "-Wdeprecated"
#include <gtest/gtest.h>
-#pragma clang diagnostic pop
#include <sstream>
#define PARSE_FAILURES_NONFATAL // return empty optionals wherever possible instead of asserting.
#include "nativehelper/jni_macros.h"
-// Provide static storage to these values so they can be used in a runtime context.
-// This has to be defined local to the test translation unit to avoid ODR violations prior to C++17.
-#define STORAGE_FN_FOR_JNI_TRAITS(jtype, ...) \
-constexpr char nativehelper::detail::jni_type_trait<jtype>::type_descriptor[]; \
-constexpr char nativehelper::detail::jni_type_trait<jtype>::type_name[];
-
-DEFINE_JNI_TYPE_TRAIT(STORAGE_FN_FOR_JNI_TRAITS)
-
template <typename T>
std::string stringify_helper(const T& val) {
std::stringstream ss;