summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Ray <jimray@google.com>2017-07-31 05:30:33 (GMT)
committerJim Ray <jimray@google.com>2017-08-06 07:17:50 (GMT)
commit8b3023f7e4ca46e0ecf5f660dd7340c79139bc34 (patch)
treea3e7397740b904b03be9a166c43288fc340d801a /src
parentb3695ee3256d371219a00e39cdd7e5e33a4a0214 (diff)
downloadglog-8b3023f7e4ca46e0ecf5f660dd7340c79139bc34.zip
glog-8b3023f7e4ca46e0ecf5f660dd7340c79139bc34.tar.gz
glog-8b3023f7e4ca46e0ecf5f660dd7340c79139bc34.tar.bz2
Fix LOG_EVERY_N with clang -Wunused-local-typedef
Glog uses a pre-C++11 compile time assert to verify the validity of the severity parameter for LOG_EVERY_N. Unfortunately, some compilers will complain about the usage of LOG_EVERY_N with "-Wunused-local-typedef" due to the way the compile time assert is constructed. This makes it impossible to use LOG_EVERY_N with this warning treated as an error. The fix simply removes the assert entirely. This is safe to do since you can't put anything invalid into the severity parameters without generating a compile error elsewhere. This has been safe to do ever since the GLOG_ prefixes were added as part of 6febec361e. Fixes #223
Diffstat (limited to 'src')
-rw-r--r--src/glog/logging.h.in3
-rwxr-xr-xsrc/windows/glog/logging.h3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in
index 35c65be..5d6fead 100644
--- a/src/glog/logging.h.in
+++ b/src/glog/logging.h.in
@@ -938,9 +938,6 @@ bool IsFailureSignalHandlerInstalled();
typedef @ac_google_namespace@::glog_internal_namespace_::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
#define LOG_EVERY_N(severity, n) \
- GOOGLE_GLOG_COMPILE_ASSERT(@ac_google_namespace@::GLOG_ ## severity < \
- @ac_google_namespace@::NUM_SEVERITIES, \
- INVALID_REQUESTED_LOG_SEVERITY); \
SOME_KIND_OF_LOG_EVERY_N(severity, (n), @ac_google_namespace@::LogMessage::SendToLog)
#define SYSLOG_EVERY_N(severity, n) \
diff --git a/src/windows/glog/logging.h b/src/windows/glog/logging.h
index f521a2b..f828bc7 100755
--- a/src/windows/glog/logging.h
+++ b/src/windows/glog/logging.h
@@ -942,9 +942,6 @@ bool IsFailureSignalHandlerInstalled();
typedef google::glog_internal_namespace_::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
#define LOG_EVERY_N(severity, n) \
- GOOGLE_GLOG_COMPILE_ASSERT(google::GLOG_ ## severity < \
- google::NUM_SEVERITIES, \
- INVALID_REQUESTED_LOG_SEVERITY); \
SOME_KIND_OF_LOG_EVERY_N(severity, (n), google::LogMessage::SendToLog)
#define SYSLOG_EVERY_N(severity, n) \