smadaminov / ovs-dpdk-meson-issues

VMware Summer 2021
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

[-Wunused-parameter] sflow functions have unused parameter 'now' #62

Closed smadaminov closed 2 years ago

smadaminov commented 2 years ago

Functions sfl_poller_tick, sfl_sampler_tick, and sfl_receiver_tick have unused parameter now. This results in warnings during compilation. Specifically,

../lib/sflow_poller.c:128:48: warning: unused parameter 'now' [-Wunused-parameter]
void sfl_poller_tick(SFLPoller *poller, time_t now)
../lib/sflow_sampler.c:110:51: warning: unused parameter 'now' [-Wunused-parameter]
void sfl_sampler_tick(SFLSampler *sampler, time_t now)
../lib/sflow_receiver.c:144:54: warning: unused parameter 'now' [-Wunused-parameter]
void sfl_receiver_tick(SFLReceiver *receiver, time_t now)
smadaminov commented 2 years ago

removed the unused variables

local patch: 0001-fix-unused-parameter-warnings-for-sflow-functions.patch

submitted a patch to the dev list

smadaminov commented 2 years ago

First version of the patch didn't pass the check by utilities/checkpatch.py tool. So I fixed that and submitted the second version. The problem was caused by the lack of indentation between for keyword and opening left paren. Then, the line containing for should end with a curly brace.

smadaminov commented 2 years ago

Patch has been accepted. Closing.

http://patchwork.ozlabs.org/project/openvswitch/patch/20210915213219.154-1-sergey.madaminov@gmail.com/