diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-05-24 11:04:22 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-05-26 09:03:05 -0700 |
| commit | e7b3e606b2f6054bc20518d64100ae501b3e6ef3 (patch) | |
| tree | 0fd55037dced4e321d312c7f1fd52b7e940d4035 /tests | |
| parent | 98dbe2dded157a753a56df30faba3f5f51dc35f7 (diff) | |
| download | openvswitch-e7b3e606b2f6054bc20518d64100ae501b3e6ef3.tar.gz | |
test-csum: Avoid "cast increases required alignment of target type" warning.
Casting a character pointer to uint16_t * or uint32_t * provokes this
warning on sparc. There is no actual problem, because all of the accesses
to data occurs through calls to the get_unaligned_*() functions, so this
commit suppresses the warning by using "void *" as an intermediate type.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-csum.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test-csum.c b/tests/test-csum.c index 81f54b809..86de43095 100644 --- a/tests/test-csum.c +++ b/tests/test-csum.c @@ -140,8 +140,9 @@ main(void) int i; for (tc = test_cases; tc < &test_cases[ARRAY_SIZE(test_cases)]; tc++) { - const ovs_be16 *data16 = (OVS_FORCE const ovs_be16 *) tc->data; - const ovs_be32 *data32 = (OVS_FORCE const ovs_be32 *) tc->data; + const void *data = tc->data; + const ovs_be16 *data16 = (OVS_FORCE const ovs_be16 *) data; + const ovs_be32 *data32 = (OVS_FORCE const ovs_be32 *) data; uint32_t partial; /* Test csum(). */ |
