} while(0)
-static inline u64 W64(const void *p, size_t I)
+static inline u64 W64(const unsigned char *p, size_t j)
{
uint64_t x;
- memcpy(&x, (char *)p + I*sizeof(x), sizeof(x));
+ memcpy(&x, p + j*sizeof(x), sizeof(x));
return le64_to_cpu(x);
}
/* Load the last 0-7 bytes of `in` and put in len & 255 */
static void siphash_epilogue(u64 *m, const unsigned char *in, size_t len)
{
- in += (len & ~7);
+ in += len & ~(size_t)7;
*m = (u64)(len & 255) << 56;
switch (len & 7) {
case 7: *m |= (u64) in[6] << 48;