unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another
       [not found] ` <20220316043355.64E63C051CB@vcs2.savannah.gnu.org>
@ 2022-03-16 11:16   ` Lars Ingebrigtsen
  2022-03-16 11:21     ` Po Lu
  2022-03-16 12:20     ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-16 11:16 UTC (permalink / raw)
  To: emacs-devel; +Cc: Po Lu

One of these changes apparently leads to this warning:

xterm.c: In function 'handle_one_xevent':
xterm.c:959:29: warning: 'target_proto' may be used uninitialized in this function [-Wmaybe-uninitialized]
  959 |   msg.xclient.data.l[1] = (((unsigned int) min (X_DND_SUPPORTED_VERSION,
xterm.c:11653:17: note: 'target_proto' was declared here
11653 |             int target_proto;
      |                 ^~~~~~~~~~~~

On Debian/bookworm.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another
  2022-03-16 11:16   ` master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another Lars Ingebrigtsen
@ 2022-03-16 11:21     ` Po Lu
  2022-03-16 11:29       ` Lars Ingebrigtsen
  2022-03-16 12:20     ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Po Lu @ 2022-03-16 11:21 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> One of these changes apparently leads to this warning:
>
> xterm.c: In function 'handle_one_xevent':
> xterm.c:959:29: warning: 'target_proto' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   959 |   msg.xclient.data.l[1] = (((unsigned int) min (X_DND_SUPPORTED_VERSION,
> xterm.c:11653:17: note: 'target_proto' was declared here
> 11653 |             int target_proto;
>       |                 ^~~~~~~~~~~~
>
> On Debian/bookworm.

diff --git a/src/xterm.c b/src/xterm.c
index 7d1a5f4043..46a22d8dc1 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -866,6 +866,7 @@ x_dnd_get_target_window (struct x_display_info *dpyinfo,
 	  if (x_had_errors_p (dpyinfo->display) || !rc)
 	    {
 	      x_uncatch_errors_after_check ();
+	      *proto_out = -1;
 	      return None;
 	    }
 	}

Does this help?

Thanks.



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another
  2022-03-16 11:21     ` Po Lu
@ 2022-03-16 11:29       ` Lars Ingebrigtsen
  2022-03-16 11:42         ` Po Lu
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-16 11:29 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> Does this help?

Yup.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another
  2022-03-16 11:29       ` Lars Ingebrigtsen
@ 2022-03-16 11:42         ` Po Lu
  0 siblings, 0 replies; 6+ messages in thread
From: Po Lu @ 2022-03-16 11:42 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Yup.

Thanks, installed.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another
  2022-03-16 11:16   ` master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another Lars Ingebrigtsen
  2022-03-16 11:21     ` Po Lu
@ 2022-03-16 12:20     ` Eli Zaretskii
  2022-03-16 12:48       ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-03-16 12:20 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: luangruo, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 16 Mar 2022 12:16:58 +0100
> Cc: Po Lu <luangruo@yahoo.com>
> 
> One of these changes apparently leads to this warning:
> 
> xterm.c: In function 'handle_one_xevent':
> xterm.c:959:29: warning: 'target_proto' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   959 |   msg.xclient.data.l[1] = (((unsigned int) min (X_DND_SUPPORTED_VERSION,
> xterm.c:11653:17: note: 'target_proto' was declared here
> 11653 |             int target_proto;
>       |                 ^~~~~~~~~~~~
> 
> On Debian/bookworm.

Looks to me like a compiler bug, because AFAICT this variable _is_
initialized before it is used.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another
  2022-03-16 12:20     ` Eli Zaretskii
@ 2022-03-16 12:48       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2022-03-16 12:48 UTC (permalink / raw)
  To: larsi, luangruo; +Cc: emacs-devel

> Date: Wed, 16 Mar 2022 14:20:32 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: luangruo@yahoo.com, emacs-devel@gnu.org
> 
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Date: Wed, 16 Mar 2022 12:16:58 +0100
> > Cc: Po Lu <luangruo@yahoo.com>
> > 
> > One of these changes apparently leads to this warning:
> > 
> > xterm.c: In function 'handle_one_xevent':
> > xterm.c:959:29: warning: 'target_proto' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >   959 |   msg.xclient.data.l[1] = (((unsigned int) min (X_DND_SUPPORTED_VERSION,
> > xterm.c:11653:17: note: 'target_proto' was declared here
> > 11653 |             int target_proto;
> >       |                 ^~~~~~~~~~~~
> > 
> > On Debian/bookworm.
> 
> Looks to me like a compiler bug, because AFAICT this variable _is_
> initialized before it is used.

Ignore me, I was looking at a fixed source file.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-16 12:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <164740523475.20801.13974648749407379114@vcs2.savannah.gnu.org>
     [not found] ` <20220316043355.64E63C051CB@vcs2.savannah.gnu.org>
2022-03-16 11:16   ` master f62a6acd00: Better handle drag-and-drop from one Emacs frame to another Lars Ingebrigtsen
2022-03-16 11:21     ` Po Lu
2022-03-16 11:29       ` Lars Ingebrigtsen
2022-03-16 11:42         ` Po Lu
2022-03-16 12:20     ` Eli Zaretskii
2022-03-16 12:48       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).