init: add [[nodiscard]] to Result
It's better to either check these results or explicitly ignore them.
Only a few callers weren't already doing this, so it's relatively
trivial to enforce.
Test: build
Change-Id: I44cdc342e46128f66cac914aaa0b9b4559cacd8c
diff --git a/init/reboot.cpp b/init/reboot.cpp
index 866f40e..d6c5b94 100644
--- a/init/reboot.cpp
+++ b/init/reboot.cpp
@@ -142,7 +142,9 @@
LOG(WARNING) << "cannot find blank_screen in TurnOffBacklight";
return;
}
- service->Start();
+ if (auto result = service->Start(); !result) {
+ LOG(WARNING) << "Could not start blank_screen service: " << result.error();
+ }
}
static void ShutdownVold() {