From 38607369aaf63f9ac7817e0ab55c367ed08abf9e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 9 Nov 2024 07:51:16 +0530 Subject: [PATCH] ... --- kitty/fonts.c | 2 +- kitty/line.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/fonts.c b/kitty/fonts.c index 164a49e28..6fcc22397 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -834,7 +834,7 @@ shape(CPUCell *first_cpu_cell, GPUCell *first_gpu_cell, index_type num_cells, hb group_state.prev_was_empty = false; group_state.current_cell_data.cpu_cell = first_cpu_cell; group_state.current_cell_data.gpu_cell = first_gpu_cell; - group_state.current_cell_data.num_codepoints = MAX(1, lc.count); + group_state.current_cell_data.num_codepoints = MAX(1u, lc.count); group_state.current_cell_data.codepoints_consumed = 0; group_state.current_cell_data.current_codepoint = lc.chars[0]; zero_at_ptr_count(group_state.groups, group_state.groups_capacity); diff --git a/kitty/line.c b/kitty/line.c index cba06ea89..885e197a4 100644 --- a/kitty/line.c +++ b/kitty/line.c @@ -260,7 +260,7 @@ unicode_in_range(const Line *self, const index_type start, const index_type limi for (index_type i = start; i < limit; i++) { lc.chars = global_unicode_in_range_buf.chars + n; lc.capacity = global_unicode_in_range_buf.capacity - n; while (!text_in_cell_without_alloc(self->cpu_cells + i, self->text_cache, &lc)) { - size_t ns = MAX(4096, 2 * global_unicode_in_range_buf.capacity); + size_t ns = MAX(4096u, 2 * global_unicode_in_range_buf.capacity); char_type *np = realloc(global_unicode_in_range_buf.chars, ns); if (!np) return PyErr_NoMemory(); global_unicode_in_range_buf.capacity = ns; global_unicode_in_range_buf.chars = np;