Replace uses of annotation `[[gnu::unused]]` with `[[maybe_unused]]`.

The former is a GCC/Clang extension, while the latter is part of the
C++17 standard.

Test: mmm art
Bug: 169680875
Change-Id: Ia3370cee7f15a6a42662540fe61ab5efcf2941ff
diff --git a/libartbase/base/metrics/metrics_test.cc b/libartbase/base/metrics/metrics_test.cc
index 324d83d..a5ad4ec 100644
--- a/libartbase/base/metrics/metrics_test.cc
+++ b/libartbase/base/metrics/metrics_test.cc
@@ -272,13 +272,13 @@
 
   class NonZeroBackend : public TestBackendBase {
    public:
-    void ReportCounter(DatumId counter_type [[gnu::unused]], uint64_t value) override {
+    void ReportCounter(DatumId counter_type [[maybe_unused]], uint64_t value) override {
       EXPECT_NE(value, 0u);
     }
 
-    void ReportHistogram(DatumId histogram_type [[gnu::unused]],
-                         int64_t minimum_value [[gnu::unused]],
-                         int64_t maximum_value [[gnu::unused]],
+    void ReportHistogram(DatumId histogram_type [[maybe_unused]],
+                         int64_t minimum_value [[maybe_unused]],
+                         int64_t maximum_value [[maybe_unused]],
                          const std::vector<uint32_t>& buckets) override {
       bool nonzero = false;
       for (const auto value : buckets) {
@@ -296,13 +296,13 @@
 
   class ZeroBackend : public TestBackendBase {
    public:
-    void ReportCounter(DatumId counter_type [[gnu::unused]], uint64_t value) override {
+    void ReportCounter(DatumId counter_type [[maybe_unused]], uint64_t value) override {
       EXPECT_EQ(value, 0u);
     }
 
-    void ReportHistogram(DatumId histogram_type [[gnu::unused]],
-                         int64_t minimum_value [[gnu::unused]],
-                         int64_t maximum_value [[gnu::unused]],
+    void ReportHistogram(DatumId histogram_type [[maybe_unused]],
+                         int64_t minimum_value [[maybe_unused]],
+                         int64_t maximum_value [[maybe_unused]],
                          const std::vector<uint32_t>& buckets) override {
       for (const auto value : buckets) {
         EXPECT_EQ(value, 0u);
@@ -323,13 +323,13 @@
 
   class FirstBackend : public TestBackendBase {
    public:
-    void ReportCounter(DatumId counter_type [[gnu::unused]], uint64_t value) override {
+    void ReportCounter(DatumId counter_type [[maybe_unused]], uint64_t value) override {
       EXPECT_NE(value, 0u);
     }
 
-    void ReportHistogram(DatumId histogram_type [[gnu::unused]],
-                         int64_t minimum_value [[gnu::unused]],
-                         int64_t maximum_value [[gnu::unused]],
+    void ReportHistogram(DatumId histogram_type [[maybe_unused]],
+                         int64_t minimum_value [[maybe_unused]],
+                         int64_t maximum_value [[maybe_unused]],
                          const std::vector<uint32_t>& buckets) override {
       bool nonzero = false;
       for (const auto value : buckets) {
@@ -369,9 +369,9 @@
     }
 
     // All histograms are event metrics.
-    void ReportHistogram(DatumId histogram_type [[gnu::unused]],
-                         int64_t minimum_value [[gnu::unused]],
-                         int64_t maximum_value [[gnu::unused]],
+    void ReportHistogram(DatumId histogram_type [[maybe_unused]],
+                         int64_t minimum_value [[maybe_unused]],
+                         int64_t maximum_value [[maybe_unused]],
                          const std::vector<uint32_t>& buckets) override {
       bool nonzero = false;
       for (const auto value : buckets) {