Merge "Fix misc-macro-parentheses warnings in init and other core modules."
This commit is contained in:
commit
ac080d2128
8 changed files with 23 additions and 23 deletions
|
@ -194,13 +194,13 @@ class ErrnoRestorer {
|
|||
|
||||
// Helper for CHECK_STRxx(s1,s2) macros.
|
||||
#define CHECK_STROP(s1, s2, sense) \
|
||||
if (LIKELY((strcmp(s1, s2) == 0) == sense)) \
|
||||
if (LIKELY((strcmp(s1, s2) == 0) == (sense))) \
|
||||
; \
|
||||
else \
|
||||
ABORT_AFTER_LOG_FATAL \
|
||||
LOG(FATAL) << "Check failed: " \
|
||||
<< "\"" << s1 << "\"" \
|
||||
<< (sense ? " == " : " != ") << "\"" << s2 << "\""
|
||||
<< "\"" << (s1) << "\"" \
|
||||
<< ((sense) ? " == " : " != ") << "\"" << (s2) << "\""
|
||||
|
||||
// Check for string (const char*) equality between s1 and s2, LOG(FATAL) if not.
|
||||
#define CHECK_STREQ(s1, s2) CHECK_STROP(s1, s2, true)
|
||||
|
@ -213,7 +213,7 @@ class ErrnoRestorer {
|
|||
if (rc != 0) { \
|
||||
errno = rc; \
|
||||
ABORT_AFTER_LOG_FATAL \
|
||||
PLOG(FATAL) << #call << " failed for " << what; \
|
||||
PLOG(FATAL) << #call << " failed for " << (what); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define FS_MGR_SETUP_VERITY_DISABLED -2
|
||||
#define FS_MGR_SETUP_VERITY_FAIL -1
|
||||
#define FS_MGR_SETUP_VERITY_DISABLED (-2)
|
||||
#define FS_MGR_SETUP_VERITY_FAIL (-1)
|
||||
#define FS_MGR_SETUP_VERITY_SUCCESS 0
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
|
|
@ -80,11 +80,11 @@ void fs_mgr_free_fstab(struct fstab *fstab);
|
|||
#define FS_MGR_MNTALL_DEV_NEEDS_ENCRYPTION 2
|
||||
#define FS_MGR_MNTALL_DEV_MIGHT_BE_ENCRYPTED 1
|
||||
#define FS_MGR_MNTALL_DEV_NOT_ENCRYPTED 0
|
||||
#define FS_MGR_MNTALL_FAIL -1
|
||||
#define FS_MGR_MNTALL_FAIL (-1)
|
||||
int fs_mgr_mount_all(struct fstab *fstab);
|
||||
|
||||
#define FS_MGR_DOMNT_FAILED -1
|
||||
#define FS_MGR_DOMNT_BUSY -2
|
||||
#define FS_MGR_DOMNT_FAILED (-1)
|
||||
#define FS_MGR_DOMNT_BUSY (-2)
|
||||
int fs_mgr_do_mount(struct fstab *fstab, char *n_name, char *n_blk_device,
|
||||
char *tmp_mount_point);
|
||||
int fs_mgr_do_tmpfs_mount(char *n_name);
|
||||
|
|
|
@ -38,7 +38,7 @@ static void parse_line_device(struct parse_state *state, int nargs, char **args)
|
|||
#include "ueventd_keywords.h"
|
||||
|
||||
#define KEYWORD(symbol, flags, nargs) \
|
||||
[ K_##symbol ] = { #symbol, nargs + 1, flags, },
|
||||
[ K_##symbol ] = { #symbol, (nargs) + 1, flags, },
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define UTF16_REPLACEMENT_CHAR 0xfffd
|
||||
|
||||
/* Clever trick from Dianne that returns 1-4 depending on leading bit sequence*/
|
||||
#define UTF8_SEQ_LENGTH(ch) (((0xe5000000 >> ((ch >> 3) & 0x1e)) & 3) + 1)
|
||||
#define UTF8_SEQ_LENGTH(ch) (((0xe5000000 >> (((ch) >> 3) & 0x1e)) & 3) + 1)
|
||||
|
||||
/* note: macro expands to multiple lines */
|
||||
#define UTF8_SHIFT_AND_MASK(unicode, byte) \
|
||||
|
|
|
@ -279,14 +279,14 @@ static char const insn_fpaconstants[][8] = {
|
|||
"4.0", "5.0", "0.5", "10.0"
|
||||
};
|
||||
|
||||
#define insn_condition(x) arm32_insn_conditions[(x >> 28) & 0x0f]
|
||||
#define insn_blktrans(x) insn_block_transfers[(x >> 23) & 3]
|
||||
#define insn_stkblktrans(x) insn_stack_block_transfers[(3*((x >> 20)&1))^((x >> 23)&3)]
|
||||
#define op2_shift(x) op_shifts[(x >> 5) & 3]
|
||||
#define insn_fparnd(x) insn_fpa_rounding[(x >> 5) & 0x03]
|
||||
#define insn_fpaprec(x) insn_fpa_precision[(((x >> 18) & 2)|(x >> 7)) & 1]
|
||||
#define insn_fpaprect(x) insn_fpa_precision[(((x >> 21) & 2)|(x >> 15)) & 1]
|
||||
#define insn_fpaimm(x) insn_fpaconstants[x & 0x07]
|
||||
#define insn_condition(x) arm32_insn_conditions[((x) >> 28) & 0x0f]
|
||||
#define insn_blktrans(x) insn_block_transfers[((x) >> 23) & 3]
|
||||
#define insn_stkblktrans(x) insn_stack_block_transfers[(3*(((x) >> 20)&1))^(((x) >> 23)&3)]
|
||||
#define op2_shift(x) op_shifts[((x) >> 5) & 3]
|
||||
#define insn_fparnd(x) insn_fpa_rounding[((x) >> 5) & 0x03]
|
||||
#define insn_fpaprec(x) insn_fpa_precision[((((x) >> 18) & 2)|((x) >> 7)) & 1]
|
||||
#define insn_fpaprect(x) insn_fpa_precision[((((x) >> 21) & 2)|((x) >> 15)) & 1]
|
||||
#define insn_fpaimm(x) insn_fpaconstants[(x) & 0x07]
|
||||
|
||||
/* Local prototypes */
|
||||
static void disasm_register_shift(const disasm_interface_t *di, u_int insn);
|
||||
|
|
|
@ -120,7 +120,7 @@ inline GGLcolor gglFixedToIteratedColor(GGLfixed c) {
|
|||
template<bool> struct CTA;
|
||||
template<> struct CTA<true> { };
|
||||
|
||||
#define GGL_CONTEXT(con, c) context_t *con = static_cast<context_t *>(c)
|
||||
#define GGL_CONTEXT(con, c) context_t *(con) = static_cast<context_t *>(c) /* NOLINT */
|
||||
#define GGL_OFFSETOF(field) uintptr_t(&(((context_t*)0)->field))
|
||||
#define GGL_INIT_PROC(p, f) p.f = ggl_ ## f;
|
||||
#define GGL_BETWEEN(x, L, H) (uint32_t((x)-(L)) <= ((H)-(L)))
|
||||
|
@ -136,14 +136,14 @@ const int GGL_PIXEL_PIPELINE_STATE = 0x00000004;
|
|||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define GGL_RESERVE_NEEDS(name, l, s) \
|
||||
const uint32_t GGL_NEEDS_##name##_MASK = (((1LU<<(s))-1)<<l); \
|
||||
const uint32_t GGL_NEEDS_##name##_MASK = (((1LU<<(s))-1)<<(l)); \
|
||||
const uint32_t GGL_NEEDS_##name##_SHIFT = (l);
|
||||
|
||||
#define GGL_BUILD_NEEDS(val, name) \
|
||||
(((val)<<(GGL_NEEDS_##name##_SHIFT)) & GGL_NEEDS_##name##_MASK)
|
||||
|
||||
#define GGL_READ_NEEDS(name, n) \
|
||||
(uint32_t(n & GGL_NEEDS_##name##_MASK) >> GGL_NEEDS_##name##_SHIFT)
|
||||
(uint32_t((n) & GGL_NEEDS_##name##_MASK) >> GGL_NEEDS_##name##_SHIFT)
|
||||
|
||||
#define GGL_NEED_MASK(name) (uint32_t(GGL_NEEDS_##name##_MASK))
|
||||
#define GGL_NEED(name, val) GGL_BUILD_NEEDS(val, name)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#define __type_fit(t, a) (0 == 0)
|
||||
|
||||
// TODO: should this be in our <sys/cdefs.h>?
|
||||
#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
|
||||
#define __arraycount(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
// This at least matches GNU dd(1) behavior.
|
||||
#define SIGINFO SIGUSR1
|
||||
|
|
Loading…
Reference in a new issue