Re: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread Andrew Talbot
On Fri Dec 12 0:58 , Michael Stefaniuc sent: Andrew Talbot wrote: What is wrong with this patch, please? If I may venture a guess: You have replaced a nice and concise for loop into and ugly 4 line while loop. bye michael Hi Michael, Ugly? Andrew Koenig and Barbara Moo show a

Re: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread Chris Spencer
Ugly? Andrew Koenig and Barbara Moo show a similar construct in their book Accelerated C++. ;) A little off topic, but this is on page 19, before for loops are introduced. If you look ahead to page 27 (2.5.2) that example is redone with a for loop. Chris.

Re: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread Michael Stefaniuc
Andrew Talbot wrote: On Fri Dec 12 0:58 , Michael Stefaniuc sent: Andrew Talbot wrote: What is wrong with this patch, please? If I may venture a guess: You have replaced a nice and concise for loop into and ugly 4 line while loop. Ugly? Andrew Koenig and Barbara Moo show a similar

Re: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread Andrew Talbot
On Fri Dec 12 10:29 , Michael Stefaniuc mstef...@redhat.com sent: Andrew Talbot wrote: But how would you then fix the sign-compare violation, or would you just let this one go? I had to look twice as the initial warning was in a for loop above: Either leave it as is for now as the warning

RE: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread Peter Rosin
But how would you then fix the sign-compare violation, or would you just let this one go? If you want it to be more compact: unsigned int i; ... for (i = sizeof(foo) / sizeof(foo[0]) - 1; ~i; --i) Tested? No. Readable? Don't ask me... :-) Cheers, Peter

RE: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread James Mckenzie
Peter Rosin p...@axentia.se at: Dec 12, 2008 4:27 AM wrote about: RE: winmm: Sign-compare warning fix (Resend) But how would you then fix the sign-compare violation, or would you just let this one go? If you want it to be more compact: unsigned int i; ... for (i = sizeof(foo

RE: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread Michael Karcher
Am Freitag, den 12.12.2008, 09:07 -0700 schrieb James Mckenzie: unsigned int i; ... for (i = sizeof(foo) / sizeof(foo[0]) - 1; ~i; --i) Tested? No. Readable? Don't ask me... :-) I understood it, but is not the goal to avoid the use of C++ constructs in WINE code? There is no

RE: winmm: Sign-compare warning fix (Resend)

2008-12-12 Thread James Mckenzie
Michael Karcher w...@mkarcher.dialup.fu-berlin.de at: Dec 12, 2008 9:23 AM (MST) wrote about: RE: winmm: Sign-compare warning fix (Resend) Am Freitag, den 12.12.2008, 09:07 -0700 schrieb James Mckenzie: unsigned int i; ... for (i = sizeof(foo) / sizeof(foo[0]) - 1; ~i; --i

Re: winmm: Sign-compare warning fix (Resend)

2008-12-11 Thread Michael Stefaniuc
Andrew Talbot wrote: What is wrong with this patch, please? If I may venture a guess: You have replaced a nice and concise for loop into and ugly 4 line while loop. bye michael --- Changelog: winmm: Sign-compare warning fix. diff --git a/dlls/winmm/lolvldrv.c