Valgrind warning cleanup...

Dan Kegel dank at kegel.com
Sun May 14 15:52:05 CDT 2006


On 5/14/06, leslie.polzer at gmx.net <leslie.polzer at gmx.net> wrote:
> > + memset( ldtent, 0, sizeof(*ldtent) );       /* Keep valgrind happy */
> I'd never do anything like that (i.e. doing something where you have to
> put a comment besides that it's there to please lint, valgrind or what
> else code checkers there are (compilers excluded for obvious reasons).

The comment is there to mark it as something that should be gotten
rid of once we figure out the right thing to do.  I agree with you.

> > +         /* memset above already cleared *ldtent */
> Isn't this obvious?

I suppose.

> > +    *entry = null_entry;    /* Keep valgrind happy */
> This one is an exception.  It replaces the two lines removed in context
> and makes the code more readable -- the comment does therefore not
> describe the benefits accurately and should IMO be removed.

Thanks for the review!  It's moot, I think, since Alexandre considers
this a valgrind bug.  (I haven't looked at it in detail, so I can't say.)
- Dan



More information about the wine-devel mailing list