emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master updated (05b7953 -> b2b1ccb)


From: Alex Gramiak
Subject: Re: master updated (05b7953 -> b2b1ccb)
Date: Mon, 20 May 2019 12:54:36 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Alex Gramiak <address@hidden> 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.

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;
                    }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]