Fix libbinder_sdk build warnings
-Wdeprecated-declarations
-Wformat
-Wpessimizing-move
-Wsign-compare
-Wsubobject-linkage
-Wunused-result
-Wzero-as-null-pointer-constant (turned on in ag/4503295)
Bug: 285204695
Test: m libbinder_sdk
Change-Id: Id4a482c511244968e450fdeecf6b9de41bc65b04
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 39573ec..fbcf823 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -20,6 +20,7 @@
#include <inttypes.h>
#include <unistd.h>
+#include <condition_variable>
#include <android-base/properties.h>
#include <android/os/BnServiceCallback.h>
@@ -642,7 +643,7 @@
protected:
// Override realGetService for ServiceManagerShim::waitForService.
- Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) {
+ Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) override {
*_aidl_return = getDeviceService({"-g", name}, mOptions);
return Status::ok();
}