unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Gramiak <agrambot@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-diffs@gnu.org, emacs-devel@gnu.org
Subject: Re: master updated (05b7953 -> b2b1ccb)
Date: Mon, 20 May 2019 12:54:36 -0600	[thread overview]
Message-ID: <87mujhufbn.fsf@gmail.com> (raw)
In-Reply-To: <87r28tufo4.fsf@gmail.com> (Alex Gramiak's message of "Mon, 20 May 2019 12:47:07 -0600")

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

Alex Gramiak <agrambot@gmail.com> writes:

> The below diff should silence the warnings.
>
> diff --git a/src/xdisp.c b/src/xdisp.c
> index c561ea9e36..ca95f8f944 100644
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -26430,7 +26430,10 @@ normal_char_ascent_descent (struct font *font, int c, int *ascent, int *descent)
>  	{
>  	  struct font_metrics *pcm = get_per_char_metric (font, &char2b);
>  
> -	  if (!(pcm->width == 0 && pcm->rbearing == 0 && pcm->lbearing == 0))
> +	  if (!(pcm
> +                && pcm->width    == 0
> +                && pcm->rbearing == 0
> +                && pcm->lbearing == 0))
>  	    {
>  	      /* We add 1 pixel to character dimensions as heuristics
>  		 that produces nicer display, e.g. when the face has

Whoops, the pcm check shouldn't happen inside the negation.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pcm v2 --]
[-- Type: text/x-patch, Size: 1492 bytes --]

diff --git a/src/xdisp.c b/src/xdisp.c
index c561ea9e36..2d417be03e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -26430,7 +26430,9 @@ normal_char_ascent_descent (struct font *font, int c, int *ascent, int *descent)
 	{
 	  struct font_metrics *pcm = get_per_char_metric (font, &char2b);
 
-	  if (!(pcm->width == 0 && pcm->rbearing == 0 && pcm->lbearing == 0))
+	  if (pcm && !(pcm->width    == 0
+                       && pcm->rbearing == 0
+                       && pcm->lbearing == 0))
 	    {
 	      /* We add 1 pixel to character dimensions as heuristics
 		 that produces nicer display, e.g. when the face has
@@ -28479,8 +28481,10 @@ gui_produce_glyphs (struct it *it)
 	  if (get_char_glyph_code (it->char_to_display, font, &char2b))
 	    {
 	      pcm = get_per_char_metric (font, &char2b);
-	      if (pcm->width == 0
-		  && pcm->rbearing == 0 && pcm->lbearing == 0)
+	      if (pcm
+                  && pcm->width    == 0
+                  && pcm->rbearing == 0
+                  && pcm->lbearing == 0)
 		pcm = NULL;
 	    }
 
@@ -28742,8 +28746,10 @@ gui_produce_glyphs (struct it *it)
 		  if (get_char_glyph_code (' ', font, &char2b))
 		    {
 		      pcm = get_per_char_metric (font, &char2b);
-		      if (pcm->width == 0
-			  && pcm->rbearing == 0 && pcm->lbearing == 0)
+		      if (pcm
+                          && pcm->width    == 0
+                          && pcm->rbearing == 0
+                          && pcm->lbearing == 0)
 			pcm = NULL;
 		    }
 

  parent reply	other threads:[~2019-05-20 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190520020459.10030.99221@vcs0.savannah.gnu.org>
     [not found] ` <m3ftp972fh.fsf@gnus.org>
2019-05-20 18:47   ` master updated (05b7953 -> b2b1ccb) Alex Gramiak
2019-05-20 18:50     ` Lars Ingebrigtsen
2019-05-20 18:54     ` Alex Gramiak [this message]
2019-05-20 20:34     ` Paul Eggert

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mujhufbn.fsf@gmail.com \
    --to=agrambot@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-diffs@gnu.org \
    --cc=larsi@gnus.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).