[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master cd88f6de4b: Adjust zero-width grapheme clusters so they are d
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: master cd88f6de4b: Adjust zero-width grapheme clusters so they are displayed (Bug#50951) |
Date: |
Tue, 27 Sep 2022 12:26:54 +0900 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
On Tue, 27 Sep 2022 11:47:25 +0900,
Po Lu wrote:
>
> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
>
> > branch: master
> > commit cd88f6de4be1f8eba1db038b371d769f584be53b
> > Author: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> > Commit: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> >
> > Adjust zero-width grapheme clusters so they are displayed (Bug#50951)
> >
> > * src/composite.c (composition_gstring_adjust_zero_width): New function.
> > * src/composite.h: Declare it.
> > * src/font.c (Ffont_shape_gstring): Use it before putting gstring to
> > cache.
>
> This gives:
>
> In file included from composite.c:29:
> In function ‘AREF’,
> inlined from ‘composition_gstring_adjust_zero_width’ at
> composite.c:839:11:
> lisp.h:1941:35: warning: ‘glyph’ may be used uninitialized
> [-Wmaybe-uninitialized]
> 1941 | return XVECTOR (array)->contents[idx];
> | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
> composite.c: In function ‘composition_gstring_adjust_zero_width’:
> composite.c:816:19: note: ‘glyph’ was declared here
> 816 | Lisp_Object glyph;
> | ^~~~~
>
This is a false alarm. The variable `glyph' is left uninitialized
only when i == LGSTRING_GLYPH_LEN (gstring), and all the uses are
guarded by this condition. So the usual practice is to add UNINIT in
this case?
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp