diff options
author | 2020-03-04 10:58:29 -0800 | |
---|---|---|
committer | 2020-03-05 18:25:57 +0000 | |
commit | 310432e7c8b36a2d112376fb76369d4c2487763d (patch) | |
tree | ee844789b7f86c66e6877c6110c6376cb6fdd7a7 | |
parent | 7f43595d5884497d874cfafe40030e9891b8d7d6 (diff) |
Fix bugprone-macro-parentheses warnings
Bug: 150783705
Test: WITH_TIDY=1 make
Change-Id: If8462783e9e15d46a48004285ced2a0e04d27b42
-rw-r--r-- | libdexfile/external/dex_file_supp.cc | 2 | ||||
-rw-r--r-- | libnativebridge/native_bridge_lazy.cc | 2 | ||||
-rw-r--r-- | libnativeloader/native_loader_lazy.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libdexfile/external/dex_file_supp.cc b/libdexfile/external/dex_file_supp.cc index e207953a0a..c0bfe544fe 100644 --- a/libdexfile/external/dex_file_supp.cc +++ b/libdexfile/external/dex_file_supp.cc @@ -77,7 +77,7 @@ bool TryLoadLibdexfileExternal([[maybe_unused]] std::string* err_msg) { #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 edc7848bba..b3f4ada9bc 100644 --- a/libnativebridge/native_bridge_lazy.cc +++ b/libnativebridge/native_bridge_lazy.cc @@ -40,7 +40,7 @@ FuncPtr GetFuncPtr(const char* function_name) { 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 2eb1203796..05d339abf9 100644 --- a/libnativeloader/native_loader_lazy.cpp +++ b/libnativeloader/native_loader_lazy.cpp @@ -40,7 +40,7 @@ FuncPtr GetFuncPtr(const char* function_name) { return f; } -#define GET_FUNC_PTR(name) GetFuncPtr<decltype(&name)>(#name) +#define GET_FUNC_PTR(name) GetFuncPtr<decltype(&(name))>(#name) } // namespace |