Re: [Mesa-dev] [PATCH] util: add new ASSERT_BITFIELD_SIZE() macro (v3)

2017-11-17 Thread Brian Paul
On 11/17/2017 04:59 AM, Eric Engestrom wrote: On Thursday, 2017-11-16 11:17:57 -0700, Brian Paul wrote: For checking that bitfields are large enough to hold the largest expected value. v2: move into existing util/macros.h header where STATIC_ASSERT() lives. v3: add MAYBE_UNUSED to variable

Re: [Mesa-dev] [PATCH] util: add new ASSERT_BITFIELD_SIZE() macro (v3)

2017-11-17 Thread Eric Engestrom
On Thursday, 2017-11-16 11:17:57 -0700, Brian Paul wrote: > For checking that bitfields are large enough to hold the largest > expected value. > > v2: move into existing util/macros.h header where STATIC_ASSERT() lives. > v3: add MAYBE_UNUSED to variable declaration Good shout on the

Re: [Mesa-dev] [PATCH] util: add new ASSERT_BITFIELD_SIZE() macro (v3)

2017-11-16 Thread Ian Romanick
I like this. Reviewed-by: Ian Romanick On 11/16/2017 10:17 AM, Brian Paul wrote: > For checking that bitfields are large enough to hold the largest > expected value. > > v2: move into existing util/macros.h header where STATIC_ASSERT() lives. > v3: add MAYBE_UNUSED to

[Mesa-dev] [PATCH] util: add new ASSERT_BITFIELD_SIZE() macro (v3)

2017-11-16 Thread Brian Paul
For checking that bitfields are large enough to hold the largest expected value. v2: move into existing util/macros.h header where STATIC_ASSERT() lives. v3: add MAYBE_UNUSED to variable declaration --- src/util/macros.h | 17 + 1 file changed, 17 insertions(+) diff --git