OSDN Git Service

Allow unused private field
authorChristopher Wiley <wiley@google.com>
Thu, 14 Apr 2016 17:32:56 +0000 (10:32 -0700)
committerChristopher Wiley <wiley@google.com>
Thu, 14 Apr 2016 18:15:05 +0000 (11:15 -0700)
This field is unused when we build unittests for OSX.

Bug: 28117776
Test: Compiles

Change-Id: I6add6946896a8cc2838309e6188812d4c7c497cb

service/Android.mk
service/ipc/ipc_handler_linux.h

index 6f01ed0..f5220c6 100644 (file)
@@ -138,6 +138,7 @@ LOCAL_MODULE := bluetoothtbd
 LOCAL_REQUIRED_MODULES = bluetooth.default
 LOCAL_STATIC_LIBRARIES += libbtcore
 LOCAL_SHARED_LIBRARIES += \
+       libbase \
        libbinder \
        libchrome \
        libcutils \
@@ -173,7 +174,7 @@ endif
 LOCAL_C_INCLUDES += $(btserviceCommonIncludes)
 LOCAL_MODULE_TAGS := debug tests
 LOCAL_MODULE := bluetoothtbd-host_test
-LOCAL_SHARED_LIBRARIES += libchrome
+LOCAL_SHARED_LIBRARIES += libbase libchrome
 LOCAL_STATIC_LIBRARIES += libgmock_host libgtest_host liblog
 
 LOCAL_CFLAGS += $(bluetooth_CFLAGS) $(btservice_orig_HOST_NDEBUG)
@@ -201,6 +202,7 @@ LOCAL_C_INCLUDES += $(btserviceCommonIncludes)
 LOCAL_MODULE_TAGS := debug tests
 LOCAL_MODULE := bluetoothtbd_test
 LOCAL_SHARED_LIBRARIES += \
+       libbase \
        libbinder \
        libchrome \
        libutils
index 4eaef59..d60b99a 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <atomic>
 
+#include <android-base/macros.h>
 #include <base/files/file_path.h>
 #include <base/files/scoped_file.h>
 #include <base/macros.h>
@@ -61,7 +62,11 @@ class IPCHandlerLinux : public IPCHandler {
   void NotifyStoppedOnCurrentThread();
 
   // True, if the IPC mechanism is running.
+#if defined(__APPLE__)
+  bool running_ ATTRIBUTE_UNUSED;
+#else
   bool running_;
+#endif
 
   // The server socket on which we listen to incoming connections.
   base::ScopedFD socket_;