Peter Rosin peda@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[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?
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[0] avoiding a divide by zero error.
James McKenzie