#define INNER_LOOP_64 do { \
uint64_t str, res, dec; \
bool aligned = rspamd_is_aligned_as(c, str); \
- bool oaligned = rspamd_is_aligned_as(o, res); \
while (inlen >= 13) { \
if (aligned) { str = *(uint64_t *)c; } else {memcpy(&str, c, sizeof(str)); } \
str = GUINT64_TO_BE(str); \
} \
res |= dec << 16; \
res = GUINT64_FROM_BE(res); \
- if (oaligned) {*(uint64_t *)o = res;} else {memcpy(o, &res, sizeof(res));} \
+ memcpy(o, &res, sizeof(res)); \
c += 8; \
o += 6; \
outl += 6; \
#define INNER_LOOP_32 do { \
uint32_t str, res, dec; \
bool aligned = rspamd_is_aligned_as(c, str); \
- bool oaligned = rspamd_is_aligned_as(o, res); \
while (inlen >= 8) { \
if (aligned) { str = *(uint32_t *)c; } else {memcpy(&str, c, sizeof(str)); } \
str = GUINT32_TO_BE(str); \
} \
res |= dec << 8; \
res = GUINT32_FROM_BE(res); \
- if (oaligned) {*(uint32_t *)o = res;} else {memcpy(o, &res, sizeof(res));} \
+ memcpy(o, &res, sizeof(res)); \
c += 4; \
o += 3; \
outl += 3; \
ret = 0;
break;
}
- carry = q << 2;
+ carry = (uint8_t)(q << 2);
leftover++;
case 1:
break;
}
*o++ = carry | (q >> 2);
- carry = q << 6;
+ carry = (uint8_t)(q << 6);
leftover++;
outl++;
if (!decay) {
if (token->original.len >= sizeof (guint64)) {
-#ifdef _MUM_UNALIGNED_ACCESS
- *hv = mum_hash_step (*hv, *(guint64 *)token->original.begin);
-#else
guint64 tmp;
memcpy (&tmp, token->original.begin, sizeof (tmp));
*hv = mum_hash_step (*hv, tmp);
-#endif
}
/* Check for decay */