tools/widl/typegen.c pointer initialization

Dan Hipschman dsh at linux.ucla.edu
Sun Oct 28 21:02:07 CDT 2007


On Mon, Oct 29, 2007 at 01:26:45AM +0100, Gerald Pfeifer wrote:
> I think the question is whether a compiler can reasonably be expected
> to deduce that the source is fine.  If that deduction involves solving
> the halting problem (or similar) hacking the source to avoid the warning
> actually doesn't occur to be that bad. ;-)

Nope, you can't depend on the compiler to verify your code is correct.
That's why you should try to write it in such a way that people can
understand it.  Hacking the code to make the compiler happy at the cost
of making the code less clear is not a good idea.

> > I think the real problem is that the code is just not clear enough.
> > I've been meaning to add asserts.  Where asserts are impractical:
> > comments.
> 
> Does this mean you are going to submit some patches to address this?

If you tell me what options you build with and I can reproduce the
warning then I'll be more than happy to try to fix it.  I build widl
with -W -Wall and get two warnings.  One of which is in the
bison-generated code; the other I sent a patch to silence and Alexandre
rejected it.



More information about the wine-devel mailing list