[ewg] Compiler warnings in backport patches
Bryan O'Sullivan
bos at pathscale.com
Thu Mar 22 11:24:48 PDT 2007
Roland Dreier wrote:
> No, I don't think warning-free code is a good goal. First of all, for
> a project like OFED, being warning-free isn't really all that easy to
> even define, given that warnings come and go depending on compiler
> version.
It's not so bad for OFED, actually, since there's a fixed list of
distros and kernels targeted, and a fixed set of backport patches and
addon include files.
> Second, some warnings are compiler bugs, plain and simple,
> and making code worse to hide them just isn't a good idea.
I don't know if you've tried building the OFED kernel code (lucky you if
you've been able to ignore it), but it produces many dozens of warnings.
I've definitely run into the problem with OFED where I ignored a
warning, because what's one warning among 60, only to find that I was in
fact ignoring a problem that caused a kernel crash at runtime. This has
happened more than once. Not surprisingly, the number of warnings is
related to the distance of the targeted backport kernel from current git.
If it wasn't for time spent fixing bugs that I couldn't see for the
forest of warnings, I'd be firmly on the fence on this, even though
Betsy is my boss, and it's my job to agree with her in public :-) As
things stand, it's an unappetising prospect, but I think at least worth
taking a crack at.
<b
More information about the ewg
mailing list