aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-05 05:40:25 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-05 05:40:25 +0000
commit138897d14ac648c341817e96f009035302f29f49 (patch)
treed574ac659a3b28d22e943e801a40c55205b62e48
parentada3844361b674ab26cd31190a6f308c58e5b72a (diff)
parent608c74aecfdbfd7d888bde3775186c4020c44476 (diff)
downloadbionic-android10-sidebranch.tar.gz
Merge "Fix bugprone-macro-parentheses warnings" am: 608c74aecfandroid10-sidebranch
Change-Id: Ie9fee69253e70ad129eadd2d8d78d8beb1498918
-rw-r--r--libc/include/bits/posix_limits.h12
-rw-r--r--libc/include/malloc.h4
-rw-r--r--libc/include/pthread.h2
-rw-r--r--libc/include/sys/cdefs.h2
-rw-r--r--libc/platform/bionic/reserved_signals.h6
-rw-r--r--libc/platform/bionic/tls_defines.h4
-rw-r--r--linker/linker_debug.h2
7 files changed, 16 insertions, 16 deletions
diff --git a/libc/include/bits/posix_limits.h b/libc/include/bits/posix_limits.h
index 8dfea52ac..452f5f6ed 100644
--- a/libc/include/bits/posix_limits.h
+++ b/libc/include/bits/posix_limits.h
@@ -37,7 +37,7 @@
#define __BIONIC_POSIX_FEATURE_MISSING (-1)
#define __BIONIC_POSIX_FEATURE_SINCE(level) \
- (((__ANDROID_API__) >= level) ? _POSIX_VERSION : __BIONIC_POSIX_FEATURE_MISSING)
+ (((__ANDROID_API__) >= (level)) ? _POSIX_VERSION : __BIONIC_POSIX_FEATURE_MISSING)
/* Availability macros. */
/* See http://man7.org/linux/man-pages/man7/posixoptions.7.html for documentation. */
@@ -104,15 +104,15 @@
#define _POSIX2_UPE __BIONIC_POSIX_FEATURE_MISSING
#if defined(__LP64__)
-#define _POSIX_V7_ILP32_OFF32 -1
-#define _POSIX_V7_ILP32_OFFBIG -1
+#define _POSIX_V7_ILP32_OFF32 (-1)
+#define _POSIX_V7_ILP32_OFFBIG (-1)
#define _POSIX_V7_LP64_OFF64 1
#define _POSIX_V7_LPBIG_OFFBIG 1
#else
#define _POSIX_V7_ILP32_OFF32 1
-#define _POSIX_V7_ILP32_OFFBIG -1
-#define _POSIX_V7_LP64_OFF64 -1
-#define _POSIX_V7_LPBIG_OFFBIG -1
+#define _POSIX_V7_ILP32_OFFBIG (-1)
+#define _POSIX_V7_LP64_OFF64 (-1)
+#define _POSIX_V7_LPBIG_OFFBIG (-1)
#endif
#define _XOPEN_CRYPT __BIONIC_POSIX_FEATURE_MISSING
diff --git a/libc/include/malloc.h b/libc/include/malloc.h
index aa046b94f..ba0af3ca3 100644
--- a/libc/include/malloc.h
+++ b/libc/include/malloc.h
@@ -162,14 +162,14 @@ int malloc_info(int __must_be_zero, FILE* __fp) __INTRODUCED_IN(23);
*
* Available since API level 27.
*/
-#define M_DECAY_TIME -100
+#define M_DECAY_TIME (-100)
/**
* mallopt() option to immediately purge any memory not in use. This
* will release the memory back to the kernel. The value is ignored.
*
* Available since API level 28.
*/
-#define M_PURGE -101
+#define M_PURGE (-101)
/**
* [mallopt(3)](http://man7.org/linux/man-pages/man3/mallopt.3.html) modifies
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index 331e92ca2..8bc897a31 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -68,7 +68,7 @@ enum {
#define PTHREAD_ONCE_INIT 0
#if __ANDROID_API__ >= 24
-#define PTHREAD_BARRIER_SERIAL_THREAD -1
+#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
#endif
#if defined(__LP64__)
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 9e214e547..b4556a74e 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -303,7 +303,7 @@
/* Intended for use in evaluated contexts. */
#define __bos_dynamic_check_impl_and(bos_val, op, index, cond) \
- (bos_val == __BIONIC_FORTIFY_UNKNOWN_SIZE || \
+ ((bos_val) == __BIONIC_FORTIFY_UNKNOWN_SIZE || \
(__builtin_constant_p(index) && bos_val op index && (cond)))
#define __bos_dynamic_check_impl(bos_val, op, index) \
diff --git a/libc/platform/bionic/reserved_signals.h b/libc/platform/bionic/reserved_signals.h
index 4ac6455d6..3c5bc02bf 100644
--- a/libc/platform/bionic/reserved_signals.h
+++ b/libc/platform/bionic/reserved_signals.h
@@ -47,9 +47,9 @@
// If you change this, also change __ndk_legacy___libc_current_sigrtmin
// in <android/legacy_signal_inlines.h> to match.
-#define BIONIC_SIGNAL_DEBUGGER __SIGRTMIN + 3
-#define BIONIC_SIGNAL_PROFILER __SIGRTMIN + 4
-#define BIONIC_SIGNAL_FDTRACK __SIGRTMIN + 7
+#define BIONIC_SIGNAL_DEBUGGER (__SIGRTMIN + 3)
+#define BIONIC_SIGNAL_PROFILER (__SIGRTMIN + 4)
+#define BIONIC_SIGNAL_FDTRACK (__SIGRTMIN + 7)
#define __SIGRT_RESERVED 8
static inline __always_inline sigset64_t filter_reserved_signals(sigset64_t sigset, int how) {
diff --git a/libc/platform/bionic/tls_defines.h b/libc/platform/bionic/tls_defines.h
index 92f707aad..78099b3d4 100644
--- a/libc/platform/bionic/tls_defines.h
+++ b/libc/platform/bionic/tls_defines.h
@@ -80,8 +80,8 @@
// [1] "Addenda to, and Errata in, the ABI for the ARM Architecture". Section 3.
// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045e/IHI0045E_ABI_addenda.pdf
-#define MIN_TLS_SLOT -1 // update this value when reserving a slot
-#define TLS_SLOT_BIONIC_TLS -1
+#define MIN_TLS_SLOT (-1) // update this value when reserving a slot
+#define TLS_SLOT_BIONIC_TLS (-1)
#define TLS_SLOT_DTV 0
#define TLS_SLOT_THREAD_ID 1
#define TLS_SLOT_APP 2 // was historically used for errno
diff --git a/linker/linker_debug.h b/linker/linker_debug.h
index 738ff6f58..477b0092b 100644
--- a/linker/linker_debug.h
+++ b/linker/linker_debug.h
@@ -58,7 +58,7 @@
#include <async_safe/log.h>
#include <async_safe/CHECK.h>
-#define LINKER_VERBOSITY_PRINT -1
+#define LINKER_VERBOSITY_PRINT (-1)
#define LINKER_VERBOSITY_INFO 0
#define LINKER_VERBOSITY_TRACE 1
#define LINKER_VERBOSITY_DEBUG 2