hash: silence warning on pointer arithmetic
authorCyril Chemparathy <cchemparathy@ezchip.com>
Mon, 22 Jun 2015 18:34:18 +0000 (11:34 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 24 Jun 2015 10:00:41 +0000 (12:00 +0200)
commit0052d53df4a407627d58a908bfe348ba5c44d462
tree5c00d92b8a8920305951dbc368079d21834c2051
parent2f935c125a0935ecf86a376bcc1182834c08fe96
hash: silence warning on pointer arithmetic

Since sig_tbl_bucket_size and key_tbl_key_size are explicitly aligned
at initialization, offset dereferences in the hash table code cannot
possibly be unaligned.  However, the compiler is unaware of this fact
and complains on -Wcast-align.  This patch modifies the code to use
RTE_PTR_ADD(), thereby silencing the compiler by casting through (void
*).

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_hash/rte_hash.c