Passthrough service functions: warn unused result am: d51a3e18d6
am: 30fa700241
Change-Id: I36d596de0a08fc851e367756ed19711e906b2c13
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);
}