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

Commit ce244b87 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

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

Change-Id: Ia7f58971d3c828fa0bed800585cec3ca446ca655
parents 44d93a06 eb209a41
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 "    "