diff options
| author | Chong Yidong | 2011-04-08 15:18:25 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-04-08 15:18:25 -0400 |
| commit | 5324d904a3c7e2eaf0e15edab0d6c55fe7c9dcd2 (patch) | |
| tree | 7ad646fefaa39116b01d2e99cfa5d4a6d0bc4e1e | |
| parent | 0080dc6bd919f83c036bb6072800032b1723b248 (diff) | |
| download | emacs-5324d904a3c7e2eaf0e15edab0d6c55fe7c9dcd2.tar.gz emacs-5324d904a3c7e2eaf0e15edab0d6c55fe7c9dcd2.zip | |
* xterm.c (handle_one_xevent): Avoid type-punned derefencing of X events.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5e92b45b9d0..82c1597e343 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-04-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * xterm.c (handle_one_xevent): Avoid type-punned derefencing of X | ||
| 4 | events. | ||
| 5 | |||
| 1 | 2011-04-08 Svante Signell <svante.signell@telia.com> (tiny change) | 6 | 2011-04-08 Svante Signell <svante.signell@telia.com> (tiny change) |
| 2 | 7 | ||
| 3 | * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450). | 8 | * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450). |
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; |