Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38c213c7 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by android-build-merger
Browse files

Merge "Fix misc-macro-parentheses warnings in test macros." am: 23d433c5 am: eb209a41

am: ce244b87

* commit 'ce244b87':
  Fix misc-macro-parentheses warnings in test macros.

Change-Id: I452f36981fee2eca395763adca572d9b1199f950
parents 88970930 ce244b87
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
namespace android {

#define CHECK_OFFSET(type, member, expected_offset) \
  static_assert((offsetof(type, member) == expected_offset), "")
  static_assert((offsetof(type, member) == (expected_offset)), "")

struct Foo {
  uint32_t dummy;
+2 −2
Original line number Diff line number Diff line
@@ -55,10 +55,10 @@
 * operation with a byte that only has the relevant bit set.
 * eg. to check for the 12th bit, we do (array[1] & 1<<4)
 */
#define test_bit(bit, array)    (array[bit/8] & (1<<(bit%8)))
#define test_bit(bit, array)    ((array)[(bit)/8] & (1<<((bit)%8)))

/* this macro computes the number of bytes needed to represent a bit array of the specified size */
#define sizeof_bit_array(bits)  ((bits + 7) / 8)
#define sizeof_bit_array(bits)  (((bits) + 7) / 8)

#define INDENT "  "
#define INDENT2 "    "