Silence a code scanning warning

This commit is contained in:
Kovid Goyal 2020-07-07 09:20:59 +05:30
parent 17f34d1f95
commit 209b78a3ec
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -497,7 +497,7 @@ static inline bool
render_color_bitmap(Face *self, int glyph_id, ProcessedBitmap *ans, unsigned int cell_width, unsigned int cell_height, unsigned int num_cells, unsigned int baseline) { render_color_bitmap(Face *self, int glyph_id, ProcessedBitmap *ans, unsigned int cell_width, unsigned int cell_height, unsigned int num_cells, unsigned int baseline) {
(void)baseline; (void)baseline;
unsigned short best = 0, diff = USHRT_MAX; unsigned short best = 0, diff = USHRT_MAX;
for (short i = 0; i < self->face->num_fixed_sizes; i++) { for (short i = 0; i < (unsigned short)self->face->num_fixed_sizes; i++) {
unsigned short w = self->face->available_sizes[i].width; unsigned short w = self->face->available_sizes[i].width;
unsigned short d = w > (unsigned short)cell_width ? w - (unsigned short)cell_width : (unsigned short)cell_width - w; unsigned short d = w > (unsigned short)cell_width ? w - (unsigned short)cell_width : (unsigned short)cell_width - w;
if (d < diff) { if (d < diff) {