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: Po Lu
Subject: Re: Compiler warnings in dispnew.c
Date: Mon, 29 Nov 2021 08:35:50 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> 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.

Yes, this makes it go away.  Thanks.


reply via email to

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