From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: [PATCH 2/5] examples/l3fwd: fix compilation with clang 3.5 Date: Wed, 17 Dec 2014 13:55:22 +0100 Message-ID: <1418820925-20318-3-git-send-email-olivier.matz@6wind.com> References: <1418820925-20318-1-git-send-email-olivier.matz@6wind.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1418820925-20318-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Fix the following error: error: unused function 'l3fwd_simple_forward' The l3fwd_simple_forward() is maybe unused, due to compilation options (APP_LOOKUP_METHOD, ENABLE_MULTI_BUFFER_OPTIMIZE). As the combinatorial is quite big, it looks simpler to add the __attribute__((unused)) on this function, so that the compiler does not complain. Signed-off-by: Olivier Matz --- examples/l3fwd/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index bf0fcdb..918f2cb 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -724,9 +724,11 @@ get_ipv6_dst_port(void *ipv6_hdr, uint8_t portid, lookup6_struct_t * ipv6_l3fwd } #endif +static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, + struct lcore_conf *qconf) __attribute__((unused)); + #if ((APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH) && \ (ENABLE_MULTI_BUFFER_OPTIMIZE == 1)) -static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qconf); #define MASK_ALL_PKTS 0xf #define EXECLUDE_1ST_PKT 0xe -- 2.1.3