On Fri, Dec 13, 2013 at 06:45:14PM +0100, Helmut Schaa wrote:
> On Fri, Dec 13, 2013 at 6:08 PM, Ben Pfaff <b...@nicira.com> wrote:
> > On Fri, Dec 13, 2013 at 02:17:16PM +0100, Helmut Schaa wrote:
> >> Reduces binary size. Use a static inline function instead of
> >> a macro to not get "unused variable" warning everywhere.
> >>
> >> Signed-off-by: Helmut Schaa <helmut.sc...@googlemail.com>
> >> ---
> >>
> >> Not sure if this is the best idea but in my builds it reduces 
> >> libopenvswitch
> >> by around 10%.
> >
> > I guess I'm OK with this, but please update the comment, which currently
> > says "Not affected by NDEBUG."
> 
> Will do.
> 
> > If you want to reduce size as much as possible, it might be better to
> > update the callers to avoid those warnings.
> 
> There is quite a big number of callers:
> 
> # grep -r ovs_assert * | wc -l
> 2324

You must have extra files in a subdirectory, or maybe you are counting
generated files.  I only see 943.  That is still quite a few, but there
are far fewer unused parameter warnings.

> Replacing ovs_assert with an empty inline function (in the header)
> effectively optimizes out the whole call for all callers. And this way
> the change is not that intrusive ...

*shrug*  OK, we'll do it that way, we can change our mind later.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to