[ofa-general] Re: dealing with gcc 'comparison is always false' warnings (was: [PATCH] drivers/infiniband: fix comparsion between unsigned and negative)

Bill Nottingham notting at redhat.com
Wed May 30 12:09:37 PDT 2007


Satyam Sharma (satyam.sharma at gmail.com) said: 
> But yes, the kind of "fixes" you pointed out that _remove_ these conditions
> are definitely *not* what we would want to do.

I can see that - but I think it should be at least be brought up for each
warning, to determine either:

1) if it should be ignored
2) if a signed type is actually intended
3) if the code should be elided

While not necessarily in the IB instances, there are cases where there
are entire blocks of code (with debugging output, error returns, etc)
that can never get run, and it may make sense to remove those.

Bill



More information about the general mailing list