[ovs-git] [openvswitch/ovs] 1dea68: test-hash: Fix unaligned pointer value error.
GitHub
noreply at github.com
Tue Oct 16 22:21:12 UTC 2018
Branch: refs/heads/branch-2.6
Home: https://github.com/openvswitch/ovs
Commit: 1dea6844708fb4b14024ff7dbdf78c9aa090db80
https://github.com/openvswitch/ovs/commit/1dea6844708fb4b14024ff7dbdf78c9aa090db80
Author: Joe Stringer <joe at ovn.org>
Date: 2018-10-16 (Tue, 16 Oct 2018)
Changed paths:
M tests/test-hash.c
Log Message:
-----------
test-hash: Fix unaligned pointer value error.
Clang 4.0 complains:
../tests/test-hash.c:160:16: error: taking address of packed member 'b' of
class or structure 'offset_ovs_u128' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
in0 = &in0_data.b;
Set the bit in the aligned u128 first then copy the contents into the
offset u128 so that we don't have to take the address of the non-aligned
u128 and pass it to set_bit128.
For the 256byte_hash, fix it up so that it's actually testing the 256B
hash inside a 32-bit offset u128 as well.
Suggested-by: Ben Pfaff <blp at ovn.org>
Signed-off-by: Joe Stringer <joe at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the git
mailing list