From a92055ee43b649679d42b192832fceeee19cf7d9 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 8 Nov 2021 18:45:41 -0800 Subject: [PATCH] font_in_list_permissive: squash -Wsign-conversion warning The preceding logic guarantees this value will be non-negative. --- lib/common/textspan_lut.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/common/textspan_lut.c b/lib/common/textspan_lut.c index 9ad9cf6dd..77977576f 100644 --- a/lib/common/textspan_lut.c +++ b/lib/common/textspan_lut.c @@ -745,7 +745,8 @@ static bool font_in_list_permissive(const char *value, const char *list) { do { const char *next_pipe = strchr(list, '|'); - size_t next_pipe_or_end_pos = next_pipe ? next_pipe - list : strlen(list); + size_t next_pipe_or_end_pos = + next_pipe ? (size_t)(next_pipe - list) : strlen(list); if (font_name_equal_permissive(value, list, next_pipe_or_end_pos)) { return true; } -- 2.50.1