May I ask, what rule is this? Should we always declare global variable before defining it? or just when it is enclosed by macros?
Also, when the "!USE_LINKER_SECTIONS", we should modify the coverage.c the same way. I'll send out a patch, On Tue, Aug 20, 2013 at 1:44 PM, Ben Pfaff <b...@nicira.com> wrote: > On Mon, Aug 19, 2013 at 12:32:06PM -0700, Alex Wang wrote: > > Just noticed, when compiling with sparse, it issues the warnings like: > > > > """ > > lib/netdev-linux.c:76:1: warning: symbol 'counter_netdev_set_policing' > was > > not declared. Should it be static? > > lib/netdev-linux.c:77:1: warning: symbol 'counter_netdev_arp_lookup' was > > not declared. Should it be static? > > lib/netdev-linux.c:78:1: warning: symbol 'counter_netdev_get_ifindex' was > > not declared. Should it be static? > > """ > > Ouch, thanks, I folded in this incremental to fix that: > > diff --git a/lib/coverage.h b/lib/coverage.h > index 73b027a..3d1a115 100644 > --- a/lib/coverage.h > +++ b/lib/coverage.h > @@ -54,6 +54,7 @@ struct coverage_counter { > { \ > *counter_##COUNTER##_get() += n; \ > } \ > + extern struct coverage_counter counter_##COUNTER; \ > struct coverage_counter counter_##COUNTER \ > = { #COUNTER, COUNTER##_count, 0 }; \ > extern struct coverage_counter *counter_ptr_##COUNTER; \ >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev