emacs-devel
[Top][All Lists]
Advanced

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

Re: master ee6e4bc525: Update device-specific grab during drag-and-drop


From: Po Lu
Subject: Re: master ee6e4bc525: Update device-specific grab during drag-and-drop
Date: Sun, 21 Aug 2022 21:33:32 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> This (or something other change in this area) leads to the following
> warnings in an --with-x-toolkit=no build on the current Ubuntu:
>
> xterm.c: In function 'handle_one_xevent':
> xterm.c:21537:40: warning: potential null pointer dereference 
> [-Wnull-dereference]
> 21537 |                           device->grab &= ~(1 << xev->detail);
>       |                           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
> xterm.c:21537:40: warning: potential null pointer dereference 
> [-Wnull-dereference]
> 21537 |                           device->grab &= ~(1 << xev->detail);
>       |                                        ^~
>
> I haven't checked whether it's a correct warning or not.

I guess it can happen if another bug makes Emacs "forget" devices, but I
fixed all of those at the end of May.

So for consistency I would enclose it with if (device), but I don't
think the NULL dereference can actually happen in reality.


reply via email to

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