summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2016-05-18 17:59:37 -0500
committerChih-Hung Hsieh2016-05-18 20:11:49 -0500
commitc713bce90183fa4ade82bc6f4b08280d32f1fb58 (patch)
tree30331a4a3c19c4f85778dc96b4e5c203c0368729 /libpixelflinger
parent9b0eb7cdf4ac4650fc3f476c2f5a91c50a18e524 (diff)
downloadplatform-system-core-c713bce90183fa4ade82bc6f4b08280d32f1fb58.tar.gz
platform-system-core-c713bce90183fa4ade82bc6f4b08280d32f1fb58.tar.xz
platform-system-core-c713bce90183fa4ade82bc6f4b08280d32f1fb58.zip
Fix misc-macro-parentheses warnings in init and other core modules.
Bug: 28705665 Change-Id: Ice67cebb8c42538f8fb9cf1756678f41a9d68a31
Diffstat (limited to 'libpixelflinger')
-rw-r--r--libpixelflinger/codeflinger/disassem.c16
-rw-r--r--libpixelflinger/include/private/pixelflinger/ggl_context.h6
2 files changed, 11 insertions, 11 deletions
diff --git a/libpixelflinger/codeflinger/disassem.c b/libpixelflinger/codeflinger/disassem.c
index 39dd61461..5cbd63db8 100644
--- a/libpixelflinger/codeflinger/disassem.c
+++ b/libpixelflinger/codeflinger/disassem.c
@@ -279,14 +279,14 @@ static char const insn_fpaconstants[][8] = {
279 "4.0", "5.0", "0.5", "10.0" 279 "4.0", "5.0", "0.5", "10.0"
280}; 280};
281 281
282#define insn_condition(x) arm32_insn_conditions[(x >> 28) & 0x0f] 282#define insn_condition(x) arm32_insn_conditions[((x) >> 28) & 0x0f]
283#define insn_blktrans(x) insn_block_transfers[(x >> 23) & 3] 283#define insn_blktrans(x) insn_block_transfers[((x) >> 23) & 3]
284#define insn_stkblktrans(x) insn_stack_block_transfers[(3*((x >> 20)&1))^((x >> 23)&3)] 284#define insn_stkblktrans(x) insn_stack_block_transfers[(3*(((x) >> 20)&1))^(((x) >> 23)&3)]
285#define op2_shift(x) op_shifts[(x >> 5) & 3] 285#define op2_shift(x) op_shifts[((x) >> 5) & 3]
286#define insn_fparnd(x) insn_fpa_rounding[(x >> 5) & 0x03] 286#define insn_fparnd(x) insn_fpa_rounding[((x) >> 5) & 0x03]
287#define insn_fpaprec(x) insn_fpa_precision[(((x >> 18) & 2)|(x >> 7)) & 1] 287#define insn_fpaprec(x) insn_fpa_precision[((((x) >> 18) & 2)|((x) >> 7)) & 1]
288#define insn_fpaprect(x) insn_fpa_precision[(((x >> 21) & 2)|(x >> 15)) & 1] 288#define insn_fpaprect(x) insn_fpa_precision[((((x) >> 21) & 2)|((x) >> 15)) & 1]
289#define insn_fpaimm(x) insn_fpaconstants[x & 0x07] 289#define insn_fpaimm(x) insn_fpaconstants[(x) & 0x07]
290 290
291/* Local prototypes */ 291/* Local prototypes */
292static void disasm_register_shift(const disasm_interface_t *di, u_int insn); 292static void disasm_register_shift(const disasm_interface_t *di, u_int insn);
diff --git a/libpixelflinger/include/private/pixelflinger/ggl_context.h b/libpixelflinger/include/private/pixelflinger/ggl_context.h
index d45dabcd0..563b0f119 100644
--- a/libpixelflinger/include/private/pixelflinger/ggl_context.h
+++ b/libpixelflinger/include/private/pixelflinger/ggl_context.h
@@ -120,7 +120,7 @@ inline GGLcolor gglFixedToIteratedColor(GGLfixed c) {
120template<bool> struct CTA; 120template<bool> struct CTA;
121template<> struct CTA<true> { }; 121template<> struct CTA<true> { };
122 122
123#define GGL_CONTEXT(con, c) context_t *con = static_cast<context_t *>(c) 123#define GGL_CONTEXT(con, c) context_t *(con) = static_cast<context_t *>(c) /* NOLINT */
124#define GGL_OFFSETOF(field) uintptr_t(&(((context_t*)0)->field)) 124#define GGL_OFFSETOF(field) uintptr_t(&(((context_t*)0)->field))
125#define GGL_INIT_PROC(p, f) p.f = ggl_ ## f; 125#define GGL_INIT_PROC(p, f) p.f = ggl_ ## f;
126#define GGL_BETWEEN(x, L, H) (uint32_t((x)-(L)) <= ((H)-(L))) 126#define GGL_BETWEEN(x, L, H) (uint32_t((x)-(L)) <= ((H)-(L)))
@@ -136,14 +136,14 @@ const int GGL_PIXEL_PIPELINE_STATE = 0x00000004;
136// ---------------------------------------------------------------------------- 136// ----------------------------------------------------------------------------
137 137
138#define GGL_RESERVE_NEEDS(name, l, s) \ 138#define GGL_RESERVE_NEEDS(name, l, s) \
139 const uint32_t GGL_NEEDS_##name##_MASK = (((1LU<<(s))-1)<<l); \ 139 const uint32_t GGL_NEEDS_##name##_MASK = (((1LU<<(s))-1)<<(l)); \
140 const uint32_t GGL_NEEDS_##name##_SHIFT = (l); 140 const uint32_t GGL_NEEDS_##name##_SHIFT = (l);
141 141
142#define GGL_BUILD_NEEDS(val, name) \ 142#define GGL_BUILD_NEEDS(val, name) \
143 (((val)<<(GGL_NEEDS_##name##_SHIFT)) & GGL_NEEDS_##name##_MASK) 143 (((val)<<(GGL_NEEDS_##name##_SHIFT)) & GGL_NEEDS_##name##_MASK)
144 144
145#define GGL_READ_NEEDS(name, n) \ 145#define GGL_READ_NEEDS(name, n) \
146 (uint32_t(n & GGL_NEEDS_##name##_MASK) >> GGL_NEEDS_##name##_SHIFT) 146 (uint32_t((n) & GGL_NEEDS_##name##_MASK) >> GGL_NEEDS_##name##_SHIFT)
147 147
148#define GGL_NEED_MASK(name) (uint32_t(GGL_NEEDS_##name##_MASK)) 148#define GGL_NEED_MASK(name) (uint32_t(GGL_NEEDS_##name##_MASK))
149#define GGL_NEED(name, val) GGL_BUILD_NEEDS(val, name) 149#define GGL_NEED(name, val) GGL_BUILD_NEEDS(val, name)