Fixed warning that nLeft is set but not used

This commit is contained in:
Andrew Murray 2023-03-31 22:30:36 +11:00
parent 59d67fa68a
commit 89d2cdfcfa

View File

@ -341,7 +341,10 @@ splitlists(
PixelList *l, *r, *c, *n;
int i;
int nRight, nLeft;
int nRight;
#ifndef NO_OUTPUT
int nLeft;
#endif
int splitColourVal;
#ifdef TEST_SPLIT
@ -396,12 +399,17 @@ splitlists(
}
#endif
nCount[0] = nCount[1] = 0;
nLeft = nRight = 0;
nRight = 0;
#ifndef NO_OUTPUT
nLeft = 0;
#endif
for (left = 0, c = h[axis]; c;) {
left = left + c->count;
nCount[0] += c->count;
c->flag = 0;
#ifndef NO_OUTPUT
nLeft++;
#endif
c = c->next[axis];
if (left * 2 > pixelCount) {
break;
@ -414,7 +422,9 @@ splitlists(
break;
}
c->flag = 0;
#ifndef NO_OUTPUT
nLeft++;
#endif
nCount[0] += c->count;
}
}
@ -430,7 +440,9 @@ splitlists(
}
c->flag = 1;
nRight++;
#ifndef NO_OUTPUT
nLeft--;
#endif
nCount[0] -= c->count;
nCount[1] += c->count;
}