Move #ifdef PACKET_FANOUT at begining of join_fanout_group(...) function to fix warning message that 'fanout_opt' & 'ret' variables are not used if PACKET_FANOUT is not defined.
It may happen on 2.6.x Linux version. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- ring_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ring_rx.c b/ring_rx.c index 99f8da0..16a224b 100644 --- a/ring_rx.c +++ b/ring_rx.c @@ -196,13 +196,13 @@ static void alloc_rx_ring_frames(int sock, struct ring *ring) static void join_fanout_group(int sock, uint32_t fanout_group, uint32_t fanout_type) { +#if defined(PACKET_FANOUT) uint32_t fanout_opt = 0; int ret; if (fanout_group == 0) return; -#if defined(PACKET_FANOUT) fanout_opt = (fanout_group & 0xffff) | (fanout_type << 16); ret = setsockopt(sock, SOL_PACKET, PACKET_FANOUT, &fanout_opt, -- 2.10.2 -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to netsniff-ng+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.