[buffer] Mark a variable as unused

Weird. Somehow our HB_TINY bot started erring as this var being unused
in non-debug builds. Not sure why now...

    In file included from src/hb-ot-map.hh:32:0,
                     from src/hb-ot-shape.hh:32,
                     from src/hb-aat-layout.hh:32,
                     from src/hb-aat-layout.cc:30,
                     from src/harfbuzz.cc:1:
    src/hb-buffer.hh: In member function ‘void hb_buffer_t::assert_var(unsigned int, unsigned int)’:
    src/hb-buffer.hh:192:18: error: unused variable ‘bits’ [-Werror=unused-variable]
         unsigned int bits = (1u<<end) - (1u<<start);
                      ^~~~
cc1plus: some warnings being treated as errors
Error: Process completed with exit code 1.
This commit is contained in:
Behdad Esfahbod 2022-06-05 04:17:05 -06:00
parent e6409d3905
commit f18eb000d3
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ struct hb_buffer_t
#ifndef HB_NDEBUG
unsigned int end = start + count;
assert (end <= 8);
unsigned int bits = (1u<<end) - (1u<<start);
HB_UNUSED unsigned int bits = (1u<<end) - (1u<<start);
assert (bits == (allocated_var_bits & bits));
#endif
}