treewide: Various fixes for clang compilation

Change-Id: I37e53e3854687ffeb146db515c2de69b2e6ac02d
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/pinned.cpp b/test/pinned.cpp
index 5e58dc4..dd83375 100644
--- a/test/pinned.cpp
+++ b/test/pinned.cpp
@@ -104,8 +104,8 @@
     PinnedRef<const NoMove3> rnm3c(nm3);
     PinnedRef<const NoMove3> rnm3cr(rnm3);
     PinnedRef rnm3i(nm3);
-    PinnedRef rnm3ir(rnm3);
-    PinnedRef rnm3ic(rnm3c);
+    [[maybe_unused]] PinnedRef rnm3ir(rnm3);
+    [[maybe_unused]] PinnedRef rnm3ic(rnm3c);
 
     const NoMove3 cnm3;
     // PinnedRef<NoMove3> crnm3(cnm3);