fix gcc 5.4 warning: argument to 'sizeof' in 'memcpy' call is the same expression... 36/5636/3
authorGabriel Ganne <gabriel.ganne@enea.com>
Mon, 6 Mar 2017 14:19:40 +0000 (15:19 +0100)
committerJohn Lo <loj@cisco.com>
Tue, 7 Mar 2017 21:34:44 +0000 (21:34 +0000)
commitf7f2a9feaa2cad8313afba53b53c32f1928f664c
treeb300924abe7e74595861102e279028046b263325
parent45e4f365086267ef2551b1dedf4e309bdd00a34a
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 <gabriel.ganne@enea.com>
src/vnet/interface_api.c
src/vnet/l2/l2_vtr.c
src/vnet/l2/l2_vtr.h