Since GCC version 10, GCC no longer complains about simple implicit
integer conversions with Arithmetic operators.
For instance:
uint8_t a = 5;
uint32_t b = a + 5;
Give a warning on GCC 9 and earlier but this:
uint8_t a = 5;
uint32_t b = (a + 5) * 2;
Gives a warning with GCC 10+.
uint8_t flags = out[1];
// Should have number of filters = 1
- assert_uint_eq((flags & 0x3) + 1, 1);
+ assert_uint_eq((flags & 0x3) + 1U, 1);
// Bits 2-7 must be empty not set
assert_uint_eq(flags & (0xFF - 0x3), 0);