[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiler warnings in dispnew.c
From: |
Andreas Schwab |
Subject: |
Re: Compiler warnings in dispnew.c |
Date: |
Sun, 28 Nov 2021 12:07:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
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);
}
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Re: Compiler warnings in dispnew.c, Eli Zaretskii, 2021/11/28
Re: Compiler warnings in dispnew.c, Po Lu, 2021/11/28