Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void
- H5Z_nbit_decompress_one_byte(....)
- {
- data[data_offset + k] =
- ((val >> (*buf_len - dat_len)) & ~(~0 << dat_len)) <<
- uchar_offset;
- }
- This suspicious code was found in HDF5 project by PVS-Studio static code analyzer.
- Warning message is:
- V610 Undefined behavior. Check the shift operator '<<. The left operand '~0' is negative. h5znbit.c 974
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment