summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2016-09-15 18:02:46 -0700
committerColin Cross <ccross@android.com>2016-09-16 11:13:20 -0700
commit412ad0dad8e362aa0a588034bf755666bde7134f (patch)
tree7b34881d199644f80a1ea94de492aec643d01445 /include
parent4127ccbda502eef2ff71b72caaa3ce28a0d4b7c6 (diff)
downloadsystem_core-412ad0dad8e362aa0a588034bf755666bde7134f.tar.gz
system_core-412ad0dad8e362aa0a588034bf755666bde7134f.tar.bz2
system_core-412ad0dad8e362aa0a588034bf755666bde7134f.zip
Hide gnu extension warnings in log/log.h
system/core/include is included in the global include path using -isystem, which hides all warnings. Fix warnings in log/log.h in preparation for moving from -isystem to -I. log/log.h uses gnu extensions for zero-argument variadic macro token pasting, which clang warns about with -Weverything. Hide the warnings using pragmas. Test: m -j native Bug: 31492149 Change-Id: Ib2113f877d811a6ecc0e91c035640b506f04bd86
Diffstat (limited to 'include')
-rw-r--r--include/log/log.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/log/log.h b/include/log/log.h
index 045feca6a..24c77fcdb 100644
--- a/include/log/log.h
+++ b/include/log/log.h
@@ -41,6 +41,15 @@
extern "C" {
#endif
+// This file uses ", ## __VA_ARGS__" zero-argument token pasting to
+// work around issues with debug-only syntax errors in assertions
+// that are missing format strings. See commit
+// 19299904343daf191267564fe32e6cd5c165cd42
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
+#endif
+
// ---------------------------------------------------------------------
/*
@@ -692,6 +701,10 @@ int __android_log_buf_print(int bufID, int prio, const char *tag, const char *fm
#endif
;
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
#ifdef __cplusplus
}
#endif