aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorChong Yidong2011-04-08 15:18:25 -0400
committerChong Yidong2011-04-08 15:18:25 -0400
commit5324d904a3c7e2eaf0e15edab0d6c55fe7c9dcd2 (patch)
tree7ad646fefaa39116b01d2e99cfa5d4a6d0bc4e1e /src/xterm.c
parent0080dc6bd919f83c036bb6072800032b1723b248 (diff)
downloademacs-5324d904a3c7e2eaf0e15edab0d6c55fe7c9dcd2.tar.gz
emacs-5324d904a3c7e2eaf0e15edab0d6c55fe7c9dcd2.zip
* xterm.c (handle_one_xevent): Avoid type-punned derefencing of X events.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 4b1fe20c7a2..be7fde03c58 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4074,7 +4074,7 @@ x_window_to_scroll_bar (display, window_id)
4074 return XSCROLL_BAR (bar); 4074 return XSCROLL_BAR (bar);
4075 } 4075 }
4076 4076
4077 return 0; 4077 return NULL;
4078} 4078}
4079 4079
4080 4080
@@ -6086,7 +6086,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6086 goto OTHER; 6086 goto OTHER;
6087#endif /* USE_X_TOOLKIT */ 6087#endif /* USE_X_TOOLKIT */
6088 { 6088 {
6089 XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event; 6089 XSelectionClearEvent *eventp = &(event.xselectionclear);
6090 6090
6091 inev.ie.kind = SELECTION_CLEAR_EVENT; 6091 inev.ie.kind = SELECTION_CLEAR_EVENT;
6092 SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display; 6092 SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
@@ -6103,8 +6103,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6103 goto OTHER; 6103 goto OTHER;
6104#endif /* USE_X_TOOLKIT */ 6104#endif /* USE_X_TOOLKIT */
6105 { 6105 {
6106 XSelectionRequestEvent *eventp 6106 XSelectionRequestEvent *eventp = &(event.xselectionrequest);
6107 = (XSelectionRequestEvent *) &event;
6108 6107
6109 inev.ie.kind = SELECTION_REQUEST_EVENT; 6108 inev.ie.kind = SELECTION_REQUEST_EVENT;
6110 SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display; 6109 SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;