From efd3e78258c4d5238b58b59d7fdbfe1f141bbfd2 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 20 May 2022 14:46:45 +0800 Subject: [PATCH] Fix NS port warnings with GCC 12 * src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): Clear s->char2b after function returns. --- src/nsterm.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nsterm.m b/src/nsterm.m index a1cbbff1cc6..7fbfcf8c6d4 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4180,6 +4180,10 @@ ns_draw_glyphless_glyph_string_foreground (struct glyph_string *s) YES, YES); x += glyph->pixel_width; } + + /* GCC 12 complains even though nothing ever uses s->char2b after + this function returns. */ + s->char2b = NULL; } static void -- 2.39.2