From: Robert Pluim <rpluim@gmail.com>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: emacs-26 71a9151: * src/character.c (char_width): Support glyphs with faces. (Bug#32276)
Date: Sun, 29 Jul 2018 12:16:22 +0200 [thread overview]
Message-ID: <8736w29wjt.fsf@gmail.com> (raw)
In-Reply-To: <20180727093405.6D4D521616@vcs0.savannah.gnu.org> (Eli Zaretskii's message of "Fri, 27 Jul 2018 05:34:05 -0400 (EDT)")
eliz@gnu.org (Eli Zaretskii) writes:
> @@ -288,13 +289,15 @@ char_width (int c, struct Lisp_Char_Table *dp)
> if (VECTORP (disp))
> for (i = 0, width = 0; i < ASIZE (disp); i++)
> {
> + int c;
> ch = AREF (disp, i);
> - if (CHARACTERP (ch))
> - {
> - int w = CHARACTER_WIDTH (XFASTINT (ch));
> - if (INT_ADD_WRAPV (width, w, &width))
> - string_overflow ();
> - }
> + if (GLYPH_CODE_P (ch))
> + c = GLYPH_CODE_CHAR (ch);
> + else if (CHARACTERP (ch))
> + c = XFASTINT (ch);
> + int w = CHARACTER_WIDTH (c);
> + if (INT_ADD_WRAPV (width, w, &width))
> + string_overflow ();
> }
> }
> return width;
With gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
this gives me the following warning:
In file included from character.c:34:0:
character.c: In function ‘char_width’:
lisp.h:1772:11: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized]
? ((a) + (unsigned) 0) op ((b) + (unsigned) 0) \
^
character.c:292:10: note: ‘c’ was declared here
int c;
^
next parent reply other threads:[~2018-07-29 10:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180727093403.18242.35476@vcs0.savannah.gnu.org>
[not found] ` <20180727093405.6D4D521616@vcs0.savannah.gnu.org>
2018-07-29 10:16 ` Robert Pluim [this message]
2018-07-29 13:56 ` emacs-26 71a9151: * src/character.c (char_width): Support glyphs with faces. (Bug#32276) Paul Eggert
2018-07-30 7:07 ` Robert Pluim
2018-07-30 14:21 ` Eli Zaretskii
2018-07-30 14:44 ` Robert Pluim
2018-07-29 14:46 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736w29wjt.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.