Examples of errors detected by the V784 diagnostic


V784. The size of the bit mask is less than the size of the first operand. This will cause the loss of the higher bits.


Perl 5

V784 The size of the bit mask is less than the size of the first operand. This will cause the loss of higher bits. inffast.c 296


void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start)
{
  ....
  unsigned long hold;         /* local strm->hold */
  unsigned bits;              /* local strm->bits */
  ....
  hold &= (1U << bits) - 1;
  ....
}


Bugs Found

Checked Projects
334
Collected Errors
12 668