Fix unused-but-set-variable warnings

Test: presubmit
Bug: 197240255
Change-Id: I3c089f4882044a03b550f484264beaf1f57bc17e
diff --git a/libartbase/base/utils.cc b/libartbase/base/utils.cc
index 1c44e3f..fc19cd1 100644
--- a/libartbase/base/utils.cc
+++ b/libartbase/base/utils.cc
@@ -91,7 +91,7 @@
   CHECK_LT(start, limit);
   CHECK_EQ(RoundDown(start, kPageSize), RoundDown(limit - 1, kPageSize)) << "range spans pages";
   // Declare a volatile variable so the compiler does not elide reads from the page being touched.
-  volatile uint8_t v = 0;
+  [[maybe_unused]] volatile uint8_t v = 0;
   for (size_t i = 0; i < attempts; ++i) {
     // Touch page to maximize chance page is resident.
     v = *reinterpret_cast<uint8_t*>(start);
diff --git a/runtime/stack.cc b/runtime/stack.cc
index a6a5165..029c765 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -780,7 +780,6 @@
     DCHECK(thread_ == Thread::Current() || thread_->IsSuspended());
   }
   CHECK_EQ(cur_depth_, 0U);
-  size_t inlined_frames_count = 0;
 
   for (const ManagedStack* current_fragment = thread_->GetManagedStack();
        current_fragment != nullptr; current_fragment = current_fragment->GetLink()) {
@@ -868,7 +867,6 @@
                 return;
               }
               cur_depth_++;
-              inlined_frames_count++;
             }
           }
         }
diff --git a/tools/dmtracedump/tracedump.cc b/tools/dmtracedump/tracedump.cc
index 3cb7374..ecae6c1 100644
--- a/tools/dmtracedump/tracedump.cc
+++ b/tools/dmtracedump/tracedump.cc
@@ -1490,10 +1490,8 @@
   char classBuf[HTML_BUFSIZE], methodBuf[HTML_BUFSIZE];
   char signatureBuf[HTML_BUFSIZE];
   char anchor_buf[80];
-  const char* anchor_close = "";
   anchor_buf[0] = 0;
   if (gOptions.outputHtml) {
-    anchor_close = "</a>";
     printf("<a name=\"inclusive\"></a>\n");
     printf("<hr>\n");
     outputNavigationBar();