Skip to content

Commit

Permalink
dither: suppress warning with NDEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
haasn committed Mar 21, 2021
1 parent a374c93 commit 8e535ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dither.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,15 @@ static void makegauss(struct ctx *k, unsigned int sizeb)
k->gauss[XY(k, gauss_size - 1 - gy, gauss_size - 1 - gx)] = v;
}
}

#ifndef NDEBUG
uint64_t total = 0;
for (index_t c = 0; c < k->size2; c++) {
uint64_t oldtotal = total;
total += k->gauss[c];
assert(total >= oldtotal);
}
#endif
}

static void setbit(struct ctx *k, index_t c)
Expand Down

0 comments on commit 8e535ed

Please sign in to comment.