diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2022-12-07 12:01:32 +1300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-12-19 22:32:35 +0000 |
commit | 27af27f9018b8bf32eac8ae79401354f6f18a4c6 (patch) | |
tree | f3d16199eccb944fdc3d1799651aacb98c4925c9 /nsswitch/pam_winbind.h | |
parent | e7489be7be4d05a75a7d31275654260f84a64c79 (diff) | |
download | samba-27af27f9018b8bf32eac8ae79401354f6f18a4c6.tar.gz |
compression/huffman: tighten bit_len checks (fix SUSE -O3 build)
The struct write_context bit_len attribute is always between 0 and 31,
but if the next patches are applied without this, SUSE GCC -O3 will
worry thusly:
../../lib/compression/lzxpress_huffman.c: In function
‘lzxpress_huffman_compress’:
../../lib/compression/lzxpress_huffman.c:953:5: error: assuming signed
overflow does not occur when simplifying conditional to constant
[-Werror=strict-overflow]
if (wc->bit_len > 16) {
^
cc1: all warnings being treated as errors
Inspection tell us that the invariant holds. Nevertheless, we can
safely use an unsigned type and insist that over- or under- flow is
bad.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'nsswitch/pam_winbind.h')
0 files changed, 0 insertions, 0 deletions