From f7f2a9feaa2cad8313afba53b53c32f1928f664c Mon Sep 17 00:00:00 2001 From: Gabriel Ganne Date: Mon, 6 Mar 2017 15:19:40 +0100 Subject: fix gcc 5.4 warning: argument to 'sizeof' in 'memcpy' call is the same expression as the destination warning translates as an invalid write : sizeof(u8* b_dmac) == 8 != sizeof(eth_hdr->dst_address) == 6 ~/vpp/build-data/../src/vnet/l2/l2_vtr.c: In function 'l2pbb_get': ~/vpp/build-data/../src/vnet/l2/l2_vtr.c:734:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] ~/vpp/build-data/../src/vnet/l2/l2_vtr.c:736:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] update l2pbb_get to take an ethernet header instead of two u8* pointers for source and dest mac addresses. Change-Id: Ifcf1319a9e22614d57682f940e10f0420dc6fb8c Signed-off-by: Gabriel Ganne --- src/vnet/l2/l2_vtr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet/l2/l2_vtr.h') diff --git a/src/vnet/l2/l2_vtr.h b/src/vnet/l2/l2_vtr.h index 99aedc970db..0aea618e080 100644 --- a/src/vnet/l2/l2_vtr.h +++ b/src/vnet/l2/l2_vtr.h @@ -267,7 +267,7 @@ u32 l2pbb_get (vlib_main_t * vlib_main, u32 sw_if_index, u32 * vtr_op, u16 * outer_tag, - u8 * b_dmac, u8 * b_smac, u16 * b_vlanid, u32 * i_sid); + ethernet_header_t * eth_hdr, u16 * b_vlanid, u32 * i_sid); #endif /* included_vnet_l2_vtr_h */ -- cgit 1.2.3-korg