emacs-devel
[Top][All Lists]
Advanced

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

Re: Compiler warnings in dispnew.c


From: Eli Zaretskii
Subject: Re: Compiler warnings in dispnew.c
Date: Sun, 28 Nov 2021 17:29:26 +0200

> From: Andreas Schwab <schwab@linux-m68k.org>
> Date: Sun, 28 Nov 2021 12:07:01 +0100
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> 
> Does that work?
> 
> diff --git a/src/dispnew.c b/src/dispnew.c
> index f3f110a8f2..a976bf94c5 100644
> --- a/src/dispnew.c
> +++ b/src/dispnew.c
> @@ -1034,7 +1034,7 @@ copy_row_except_pointers (struct glyph_row *to, struct 
> glyph_row *from)
>  {
>    enum { off = offsetof (struct glyph_row, x) };
>  
> -  memcpy (&to->x, &from->x, sizeof *to - off);
> +  memcpy ((char *) to + off, (char *) from + off, sizeof *to - off);
>  }

Po Lu, please try this and tell if the warning goes away.

Thanks.



reply via email to

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