You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2017/02/15 18:54:57 UTC

[3/3] kudu git commit: Supress compile-time '((unused)) attribute ignored' warning

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 <to...@apache.org>
Reviewed-by: Mike Percy <mp...@apache.org>
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 <sa...@apache.org>
Authored: Tue Feb 14 17:56:39 2017 -0800
Committer: Todd Lipcon <to...@apache.org>
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