Fix misc-macro-parentheses warnings in minijail

Add parentheses around macro arguments used beside operators.
Bug: 28705665
Test: build with clang-tidy

(cherry picked from commit c391b9e4f7ee76bb8d8686aadbbe49b789537dc0)

Change-Id: I4b3064cb85c3776e178cf66aceda1b387ac9c42b
Reviewed-on: https://chromium-review.googlesource.com/360258
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
diff --git a/syscall_filter_unittest.c b/syscall_filter_unittest.c
index b0d4acd..596d98b 100644
--- a/syscall_filter_unittest.c
+++ b/syscall_filter_unittest.c
@@ -59,7 +59,7 @@
 #define EXPECT_KILL(_block) \
 do {	\
 	EXPECT_EQ((_block)->len, 1U);				\
-	EXPECT_EQ_STMT(_block->instrs,				\
+	EXPECT_EQ_STMT((_block)->instrs,			\
 			BPF_RET+BPF_K, SECCOMP_RET_KILL);	\
 } while (0)
 
diff --git a/test_harness.h b/test_harness.h
index 9bca7f9..c05f1a7 100644
--- a/test_harness.h
+++ b/test_harness.h
@@ -202,7 +202,7 @@
 #define _TEST(test_name) \
   static void test_name(struct __test_metadata *_metadata); \
   static struct __test_metadata _##test_name##_object = \
-    { .name= "global." #test_name, .fn= &test_name }; \
+    { .name= "global." #test_name, .fn= &(test_name) }; \
   static void __attribute__((constructor)) _register_##test_name(void) { \
     __register_test(&_##test_name##_object); \
   } \
@@ -344,10 +344,11 @@
   } \
 } while (0); OPTIONAL_HANDLER(_assert)
 
+/* NOLINT: clang-tidy adds wrong parentheses around _t. */
 #define __EXPECT_STR(_expected, _seen, _t, _assert) do { \
   const char *__exp = (_expected); \
   const char *__seen = (_seen); \
-  if (!(strcmp(__exp, __seen) _t 0))  { \
+  if (!(strcmp(__exp, __seen) _t 0))  { /* NOLINT */ \
     __TH_LOG("Expected '%s' %s '%s'.", __exp, #_t, __seen); \
     _metadata->passed = 0; \
     _metadata->trigger = 1; \