Use C++17's [[nodiscard]] instead of WARN_UNUSED_RESULT

No functionality change. Also remove some header guards along the way.

Test: m
Change-Id: I1afdcaea95a3dd56f392c4e61d7670f43615792a
diff --git a/server/LocalNetwork.h b/server/LocalNetwork.h
index 2aa7900..7a39a9d 100644
--- a/server/LocalNetwork.h
+++ b/server/LocalNetwork.h
@@ -14,13 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef NETD_SERVER_LOCAL_NETWORK_H
-#define NETD_SERVER_LOCAL_NETWORK_H
+#pragma once
 
 #include "Network.h"
 
-namespace android {
-namespace net {
+namespace android::net {
 
 class LocalNetwork : public Network {
 public:
@@ -29,11 +27,8 @@
 
 private:
     Type getType() const override;
-    int addInterface(const std::string& interface) override WARN_UNUSED_RESULT;
-    int removeInterface(const std::string& interface) override WARN_UNUSED_RESULT;
+    [[nodiscard]] int addInterface(const std::string& interface) override;
+    [[nodiscard]] int removeInterface(const std::string& interface) override;
 };
 
-}  // namespace net
-}  // namespace android
-
-#endif  // NETD_SERVER_LOCAL_NETWORK_H
+}  // namespace android::net