diff options
author | Alex Wang <alexw@nicira.com> | 2013-07-22 15:47:19 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-07-23 12:34:41 -0700 |
commit | db5a101931c5393d5f9df600559882418d536878 (patch) | |
tree | 3e2820c844a3f20209736adad31ddfaa1b0f5e13 /lib/jhash.c | |
parent | 550f0db4e0fb3bf9952e8a88b71242491b9dde2a (diff) | |
download | openvswitch-db5a101931c5393d5f9df600559882418d536878.tar.gz |
clang: Fix the alignment warning.
This commit fixes the warning issued by 'clang' when pointer is casted
to one with greater alignment.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/jhash.c')
-rw-r--r-- | lib/jhash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/jhash.c b/lib/jhash.c index 4ec2871d7..c08c36894 100644 --- a/lib/jhash.c +++ b/lib/jhash.c @@ -96,18 +96,18 @@ jhash_words(const uint32_t *p, size_t n, uint32_t basis) uint32_t jhash_bytes(const void *p_, size_t n, uint32_t basis) { - const uint8_t *p = p_; + const uint32_t *p = p_; uint32_t a, b, c; a = b = c = 0xdeadbeef + n + basis; while (n >= 12) { - a += get_unaligned_u32((uint32_t *) p); - b += get_unaligned_u32((uint32_t *) (p + 4)); - c += get_unaligned_u32((uint32_t *) (p + 8)); + a += get_unaligned_u32(p); + b += get_unaligned_u32(p + 1); + c += get_unaligned_u32(p + 2); jhash_mix(&a, &b, &c); n -= 12; - p += 12; + p += 3; } if (n) { |