Various cleanups of issues caught by clang-tidy
Change-Id: I6e79c121e7c9032cf5053dd31971e719fe76f4b6
diff --git a/build_tests/queue.cc b/build_tests/queue.cc
index 3be667e..7f67f6a 100644
--- a/build_tests/queue.cc
+++ b/build_tests/queue.cc
@@ -1,7 +1,12 @@
+#include <stdio.h>
+
#include "build_tests/queue.q.h"
int main() {
- ::build_tests::TestStruct s;
+ ::build_tests::TestMessage s;
s.field = 971;
- return (s.field == 971) ? 0 : 1;
+ char buffer[1024];
+ s.Print(buffer, sizeof(buffer));
+ buffer[sizeof(buffer) - 1] = '\0';
+ printf("s = {%s}\n", buffer);
}
diff --git a/build_tests/queue.q b/build_tests/queue.q
index df1b7db..9a32a7c 100644
--- a/build_tests/queue.q
+++ b/build_tests/queue.q
@@ -1,5 +1,5 @@
package build_tests;
-struct TestStruct {
+message TestMessage {
int32_t field;
};
diff --git a/build_tests/tcmalloc.cc b/build_tests/tcmalloc.cc
index eb74a65..c1d4429 100644
--- a/build_tests/tcmalloc.cc
+++ b/build_tests/tcmalloc.cc
@@ -1,3 +1,6 @@
#include <stdlib.h>
-int main() { void *big_chunk __attribute__((unused)) = malloc(500000); }
+int main() {
+ void *big_chunk = malloc(500000);
+ free(big_chunk);
+}