From 8941ec2cb4ff29dbf167e3b80e09a70c9164cc19 Mon Sep 17 00:00:00 2001 From: Jean-Mickael Guerin Date: Fri, 4 Mar 2016 14:14:21 +0100 Subject: fix declaration of symbol of different size I got many warnings at the link step with gcc version 5.3.1 20160225 (Ubuntu 5.3.1-10ubuntu2): /usr/bin/ld: Warning: size of symbol `cop_input_node' changed from 112 in vnet/cop/.libs/cop.o to 168 in vnet/cop/.libs/node1.o /usr/bin/ld: Warning: size of symbol `ethernet_input_node' changed from 112 in vnet/.libs/interface.o to 136 in vnet/ethernet/.libs/node.o /usr/bin/ld: Warning: size of symbol `l2output_node' changed from 112 in vnet/l2/.libs/l2_efp_filter.o to 120 in vnet/l2/.libs/l2_output.o /usr/bin/ld: Warning: size of symbol `srp_input_node' changed from 112 in vnet/srp/.libs/format.o to 136 in vnet/srp/.libs/node.o /usr/bin/ld: Warning: size of symbol `vxlan_encap_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 128 in vnet/vxlan/.libs/encap.o /usr/bin/ld: Warning: size of symbol `vxlan_input_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 144 in vnet/vxlan/.libs/decap.o ... Looking at vlib_node_registration_t, I think the reason is that the char * next_nodes[] could be bigger where the variable is defined in .c file. We should mark global variables as external in header files. Some of them can be made static. Change-Id: Ieb6961fd08180c9a69e1d884852703f3eb23f23f Signed-off-by: Jean-Mickael Guerin --- vnet/vnet/ipsec/ipsec.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'vnet/vnet/ipsec/ipsec.h') diff --git a/vnet/vnet/ipsec/ipsec.h b/vnet/vnet/ipsec/ipsec.h index b755976f2b0..386c0adecd6 100644 --- a/vnet/vnet/ipsec/ipsec.h +++ b/vnet/vnet/ipsec/ipsec.h @@ -201,13 +201,10 @@ typedef struct { ipsec_main_t ipsec_main; -vlib_node_registration_t ipsec_input_ip4_node; -vlib_node_registration_t ipsec_input_ip6_node; -vlib_node_registration_t ipsec_output_node; -vlib_node_registration_t esp_encrypt_node; -vlib_node_registration_t esp_decrypt_node; -vlib_node_registration_t ipsec_if_output_node; -vlib_node_registration_t ipsec_if_input_node; +extern vlib_node_registration_t esp_encrypt_node; +extern vlib_node_registration_t esp_decrypt_node; +extern vlib_node_registration_t ipsec_if_output_node; +extern vlib_node_registration_t ipsec_if_input_node; /* -- cgit 1.2.3-korg