Prevent warnings in amalgamated builds

In the amalgamated build some of the constants generate warnings of the
form:
warning: unused variable 'kInvalidPid' [-Wunused-const-variable]

This is because the code that refers to them is not part of the client
library (e.g. the service binaries or trace processor).
This CL adds a bunch of suppressions and remove actually unused vars.

Bug: 145339279
Change-Id: Id3f393a6fda7e55f43f463cd21bd797be8ab1b54
diff --git a/test/client_api_example.cc b/test/client_api_example.cc
index 62f04c6..62c495d 100644
--- a/test/client_api_example.cc
+++ b/test/client_api_example.cc
@@ -14,15 +14,23 @@
  * limitations under the License.
  */
 
-#include "perfetto/tracing.h"
 
 #include <chrono>
 #include <thread>
 
+// This source file is built in two ways:
+// 1. As part of the regular GN build, against standard includes.
+// 2. To test that the amalgmated SDK works, against the perfetto.h source.
+
+#ifdef PERFETTO_AMALGAMATED_SDK_TEST
+#include "perfetto.h"
+#else
+#include "perfetto/tracing.h"
 #include "protos/perfetto/config/gpu/gpu_counter_config.pbzero.h"
 #include "protos/perfetto/trace/gpu/gpu_counter_event.pbzero.h"
 #include "protos/perfetto/trace/test_event.pbzero.h"
 #include "protos/perfetto/trace/trace_packet.pbzero.h"
+#endif
 
 // Deliberately not pulling any non-public perfetto header to spot accidental
 // header public -> non-public dependency while building this file.