From 2bd434223415b09ce7d0e21eb74e81c8c2174b3d Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Mon, 17 Apr 2017 12:55:40 -0700 Subject: [PATCH] Remove VNDK warning. Added todo once usages are fixed. Bug: 33241851 Test: things with -Werror now compile in VNDK (cherry picked from commit 81626e48cb075aeab36e95047f047922d9a2715f) Merged-In: I6c4a148dca4d4710912fe62a8854cb8077651701 Change-Id: I6c4a148dca4d4710912fe62a8854cb8077651701 --- libcutils/include_vndk/cutils/log.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/libcutils/include_vndk/cutils/log.h b/libcutils/include_vndk/cutils/log.h index ae74024a3..21dc11e43 100644 --- a/libcutils/include_vndk/cutils/log.h +++ b/libcutils/include_vndk/cutils/log.h @@ -16,6 +16,32 @@ */ #ifndef _LIBS_CUTIL_LOG_H #define _LIBS_CUTIL_LOG_H -#warning "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h" + +/* We do not know if developer wanted log/log.h or subset android/log.h */ #include + +#if defined(__GNUC__) +#if defined( __clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-W#warnings" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpedantic" +#elif (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR > 9)) +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-W#warnings" +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wcpp" +#endif +#endif + +#warning "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h" + +#if defined(__GNUC__) +#if defined( __clang__) +#pragma clang diagnostic pop +#endif +#pragma GCC diagnostic pop +#endif + #endif /* _LIBS_CUTIL_LOG_H */