]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix NS port warnings with GCC 12
authorPo Lu <luangruo@yahoo.com>
Fri, 20 May 2022 06:46:45 +0000 (14:46 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 20 May 2022 06:46:45 +0000 (14:46 +0800)
* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground):
Clear s->char2b after function returns.

src/nsterm.m

index a1cbbff1cc688992ad76da5747ca61cab830d7fd..7fbfcf8c6d402f7e8f6e6d798a53b98561c636cd 100644 (file)
@@ -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