/* Avoid 32-bit overflow (dump bit buffer to top of output) */
if (bit_count >= 24) {
- bits = bd->inbufBits & ((1 << bit_count) - 1);
+ bits = bd->inbufBits & ((1U << bit_count) - 1);
bits_wanted -= bit_count;
bits <<= bits_wanted;
bit_count = 0;
{
struct group_data *hufGroup;
int dbufCount, dbufSize, groupCount, *base, *limit, selector,
- i, j, t, runPos, symCount, symTotal, nSelectors, byteCount[256];
+ i, j, runPos, symCount, symTotal, nSelectors, byteCount[256];
int runCnt = runCnt; /* for compiler */
uint8_t uc, symToByte[256], mtfSymbol[256], *selectors;
uint32_t *dbuf;
- unsigned origPtr;
+ unsigned origPtr, t;
dbuf = bd->dbuf;
dbufSize = bd->dbufSize;
{
uint32_t polynomial = endian ? 0x04c11db7 : 0xedb88320;
uint32_t c;
- int i, j;
+ unsigned i, j;
if (!crc_table)
crc_table = xmalloc(256 * sizeof(uint32_t));
if (c >= 32)
break;
on_off->opt_char = *s;
- on_off->switch_on = (1 << c);
+ on_off->switch_on = (1U << c);
if (*++s == ':') {
on_off->optarg = va_arg(p, void **);
if (s[1] == '+' || s[1] == '*') {
if (c >= 32)
break;
on_off->opt_char = l_o->val;
- on_off->switch_on = (1 << c);
+ on_off->switch_on = (1U << c);
if (l_o->has_arg != no_argument)
on_off->optarg = va_arg(p, void **);
c++;
int FAST_FUNC crypt_make_salt(char *p, int cnt /*, int x */)
{
/* was: x += ... */
- int x = getpid() + monotonic_us();
+ unsigned x = getpid() + monotonic_us();
do {
/* x = (x*1664525 + 1013904223) % 2^32 generator is lame
* (low-order bit is not "random", etc...),
int blockBegin;
int blockNo, blockNoOnesCompl;
int cksum_or_crc;
- int expected;
+ unsigned expected;
int i, j;
blockBegin = read_byte(timeout);