perfetto: fix GCC warnings (for real)

Change-Id: Ie78c31fdc7d7ceef2fde660063a54c8f87aadfdb
diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn
index d000f53..0af6551 100644
--- a/gn/standalone/BUILD.gn
+++ b/gn/standalone/BUILD.gn
@@ -100,6 +100,18 @@
     # TODO(lalitm): remove this when we upgrade to a GCC version which is good
     # enough to handle this.
     cflags_cc += [ "-Wno-maybe-uninitialized" ]
+
+    # GCC's handling of detecting infinite recursion is flaky at best and
+    # causes some false positives.
+    # TODO(lalitm): remove this when we upgrade to a GCC version which is good
+    # enough to handle this.
+    cflags_cc += [ "-Wno-infinite-recursion" ]
+
+    # GCC's handling of detecting non null arguments is flaky at best and
+    # causes some false positives.
+    # TODO(lalitm): remove this when we upgrade to a GCC version which is good
+    # enough to handle this.
+    cflags_cc += [ "-Wno-nonnull" ]
   }
 }
 
diff --git a/test/gtest_and_gmock.h b/test/gtest_and_gmock.h
index 824e73b..710d07d 100644
--- a/test/gtest_and_gmock.h
+++ b/test/gtest_and_gmock.h
@@ -34,7 +34,6 @@
 #pragma GCC diagnostic ignored "-Wmissing-noreturn"
 #pragma GCC diagnostic ignored "-Wsign-conversion"
 #pragma GCC diagnostic ignored "-Wfloat-equal"
-#pragma GCC diagnostic ignored "-Winfinite-recursion"
 #endif  // defined(__GNUC__) || defined(__clang__)
 
 #if defined(__clang__)