Fix bugprone-macro-parentheses warnings

Bug: 150783705
Test: WITH_TIDY=1 make
Change-Id: If8462783e9e15d46a48004285ced2a0e04d27b42
diff --git a/libdexfile/external/dex_file_supp.cc b/libdexfile/external/dex_file_supp.cc
index e207953..c0bfe54 100644
--- a/libdexfile/external/dex_file_supp.cc
+++ b/libdexfile/external/dex_file_supp.cc
@@ -77,7 +77,7 @@
 
 #define RESOLVE_DLFUNC_PTR(CLASS, DLFUNC) \
     decltype(DLFUNC)* DLFUNC##_ptr = reinterpret_cast<decltype(DLFUNC)*>(dlsym(handle, #DLFUNC)); \
-    if (DLFUNC == nullptr) { \
+    if ((DLFUNC) == nullptr) { \
       *err_msg = dlerror(); \
       return false; \
     }
diff --git a/libnativebridge/native_bridge_lazy.cc b/libnativebridge/native_bridge_lazy.cc
index edc7848..b3f4ada 100644
--- a/libnativebridge/native_bridge_lazy.cc
+++ b/libnativebridge/native_bridge_lazy.cc
@@ -40,7 +40,7 @@
   return f;
 }
 
-#define GET_FUNC_PTR(name) GetFuncPtr<decltype(&name)>(#name)
+#define GET_FUNC_PTR(name) GetFuncPtr<decltype(&(name))>(#name)
 
 }  // namespace
 
diff --git a/libnativeloader/native_loader_lazy.cpp b/libnativeloader/native_loader_lazy.cpp
index 2eb1203..05d339a 100644
--- a/libnativeloader/native_loader_lazy.cpp
+++ b/libnativeloader/native_loader_lazy.cpp
@@ -40,7 +40,7 @@
   return f;
 }
 
-#define GET_FUNC_PTR(name) GetFuncPtr<decltype(&name)>(#name)
+#define GET_FUNC_PTR(name) GetFuncPtr<decltype(&(name))>(#name)
 
 }  // namespace