On Sat, Jan 13, 2007 at 04:08:18AM +0000, Manuel López-Ibáñez wrote:
> Much later, the warning was given a name, Walways-true [3], since the
> warning message said explicitly that something will always be true.
> However, Andrew Morton didn't want to get a warning just because the
> expression was always true. He wanted to be warned of using the
> address of a function where it makes more sense to call the function.
Also, while it will be good to warn about
if (func)
{
...
}
it'll be bad to warn about
if (timerstruct->callbackfunc)
{
...
timerstruct->callbackfunc (...);
...
}
so be careful when implementing such warnings.
--
Rask Ingemann Lambertsen