Re: Quiet valgrind warnings in init_current_teb

2006-05-14 Thread Alexandre Julliard
"Mike Hearn" <[EMAIL PROTECTED]> writes: > ent is initialized here OK, it's correctly pointing to an LDT_ENTRY > struct on the stack. Valgrind is (presumably) complaining about > ent->HighWord.Bits.Granularity being tested before being assigned, but > that's wrong and is either a mistake in: > > a

Re: Quiet valgrind warnings in init_current_teb

2006-05-14 Thread Mike Hearn
On 5/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Of course it is testing "ent" by accessing a member of it, thus dereferencing it. ent is initialized here OK, it's correctly pointing to an LDT_ENTRY struct on the stack. Valgrind is (presumably) complaining about ent->HighWord.Bits.Granu

Re: Quiet valgrind warnings in init_current_teb

2006-05-14 Thread leslie . polzer
On Sat, May 13, 2006 at 11:11:50PM +0100, Mike Hearn wrote: > if ((ent->HighWord.Bits.Granularity = (limit >= 0x10))) > > but unless I'm reading it wrong this is not testing ent before > initialization at all, it's testing limit, assigning to ent, then > testing the result of that assignment .

Re: Quiet valgrind warnings in init_current_teb

2006-05-14 Thread Eric Pouech
Mike Hearn wrote: Hmm, are you sure this isn't a bug in Valgrind itself? The code it's warning on is this: inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) { if ((ent->HighWord.Bits.Granularity = (limit >= 0x10))) limit >>= 12; ent->LimitLow = (WORD)limit;

Re: Quiet valgrind warnings in init_current_teb

2006-05-13 Thread Mike Hearn
Hmm, are you sure this isn't a bug in Valgrind itself? The code it's warning on is this: inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) { if ((ent->HighWord.Bits.Granularity = (limit >= 0x10))) limit >>= 12; ent->LimitLow = (WORD)limit; ent->HighWord.Bi