winmm: Sign-compare warning fix (Resend)
jjmckenzie51 at earthlink.net
Fri Dec 12 10:07:53 CST 2008
Peter Rosin <peda at 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) / sizeof(foo) - 1; ~i; --i)
>Readable? Don't ask me... :-)
I understood it, but is not the goal to avoid the use of C++ constructs in WINE code?
The real question is why convert a for loop to a while loop? My guess is to avoid a possible empty or zero length foo. Of course, there should be a check before this for an empty or misformed foo avoiding a divide by zero error.
More information about the wine-devel