Supress compile-time '((unused)) attribute ignored' warning On Linux systems, we still use the user_signal_handler_thread_running_ variable, causing the compiler to complain that we've marked it incorrectly as ATTRIBUTE_UNUSED.
It is only unused on MacOS, so it can be #ifndef'd out. Change-Id: Ic579b8e66ec883f79facb666bfab0b98785679eb Reviewed-on: http://gerrit.cloudera.org:8080/6011 Reviewed-by: Todd Lipcon <[email protected]> Reviewed-by: Mike Percy <[email protected]> Tested-by: Kudu Jenkins Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/56402bd1 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/56402bd1 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/56402bd1 Branch: refs/heads/master Commit: 56402bd1a48efaed486c2f92f5897096bce2ddbb Parents: 4a5ab73 Author: Sailesh Mukil <[email protected]> Authored: Tue Feb 14 17:56:39 2017 -0800 Committer: Todd Lipcon <[email protected]> Committed: Wed Feb 15 18:36:05 2017 +0000 ---------------------------------------------------------------------- src/kudu/util/minidump.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/56402bd1/src/kudu/util/minidump.h ---------------------------------------------------------------------- diff --git a/src/kudu/util/minidump.h b/src/kudu/util/minidump.h index 58702d7..459639b 100644 --- a/src/kudu/util/minidump.h +++ b/src/kudu/util/minidump.h @@ -82,7 +82,10 @@ class MinidumpExceptionHandler { // at a time, as a sanity check. static std::atomic<int> current_num_instances_; - std::atomic<bool> user_signal_handler_thread_running_ ATTRIBUTE_UNUSED; // Unused in macOS build. + #ifndef __APPLE__ + std::atomic<bool> user_signal_handler_thread_running_;// Unused in macOS build. + #endif + scoped_refptr<Thread> user_signal_handler_thread_; // Breakpad ExceptionHandler. It registers its own signal handlers to write
