Passthrough service functions: warn unused result
am: d51a3e18d6

Change-Id: I29e151560fc8fa098b4719e3ded8086668cd1948
diff --git a/transport/include/hidl/LegacySupport.h b/transport/include/hidl/LegacySupport.h
index 3cc23f3..d7e1d74 100644
--- a/transport/include/hidl/LegacySupport.h
+++ b/transport/include/hidl/LegacySupport.h
@@ -36,6 +36,7 @@
  * Registers passthrough service implementation.
  */
 template<class Interface>
+__attribute__((warn_unused_result))
 status_t registerPassthroughServiceImplementation(
         std::string name = "default") {
     // TODO(b/34274385)
@@ -71,7 +72,8 @@
  * Return value is exit status.
  */
 template<class Interface>
-int defaultPassthroughServiceImplementation(std::string name,
+__attribute__((warn_unused_result))
+status_t defaultPassthroughServiceImplementation(std::string name,
                                             size_t maxThreads = 1) {
     configureRpcThreadpool(maxThreads, true);
     status_t result = registerPassthroughServiceImplementation<Interface>(name);
@@ -84,7 +86,8 @@
     return 0;
 }
 template<class Interface>
-int defaultPassthroughServiceImplementation(size_t maxThreads = 1) {
+__attribute__((warn_unused_result))
+status_t defaultPassthroughServiceImplementation(size_t maxThreads = 1) {
     return defaultPassthroughServiceImplementation<Interface>("default", maxThreads);
 }