bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions


From: James Youngman
Subject: Re: Questions
Date: Tue, 13 Mar 2007 09:31:51 +0000

On 3/13/07, Leslie P. Polzer <address@hidden> wrote:

Hello,

  most, if not all, parse_* functions in find/parse.c right at the beginning
to something like:

    (void) args;

What does this do, and why?

It has no effect other than silencing a compiler warning about unused
arguments.  Some parser functions are for primaries that take an
argument, like "-mtime -5" or "-exec ...".  Those parsers have to
examine the next argument by looking at the agument list.   Other
parsers however are for primaries that take no argument (like "-print"
or "-prune" or "-empty").  Those parser functions don't need to read
the next argument, and to would not otherwise use the function
argument.


  Also, I notice that est_success_rate uses floats.  I'm not very fond of that;
can't we use integers 0..100?

Certainly I'm willing to entertain the idea of changing this.
Optimisers tend to work best (andmost intuitively) when they have am
idea of the world that matches reality.  For that reason I wanted
est_success_rate to model the actual success rate of those predicates
(on average).  Some of the tests have very low values, for example
-inum is 1.0e-6.

(While I think about it, the value for -quit is very wrong; fixed.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]