diff options
| author | Paul Eggert | 2017-12-03 17:58:08 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-12-03 18:18:01 -0800 |
| commit | 1dcf8b5ec59ff714b02ccc7466c02a9e6132bcc9 (patch) | |
| tree | cdbee5a07c910750fdeb50276ab2d20b5daf312f /src | |
| parent | 66396972ed5273516a77589c350f6ce9becd8d9f (diff) | |
| download | emacs-1dcf8b5ec59ff714b02ccc7466c02a9e6132bcc9.tar.gz emacs-1dcf8b5ec59ff714b02ccc7466c02a9e6132bcc9.zip | |
Pacify GCC on Ubuntu 17.10 x86-64
* src/xfns.c (x_real_pos_and_offsets): Pull out parent frame
into a local, so that GCC doesn't warn about dereferencing
a possibly-null pointer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xfns.c b/src/xfns.c index bbe73aa7c28..f1c7fd6f3e4 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -215,8 +215,9 @@ x_real_pos_and_offsets (struct frame *f, | |||
| 215 | int win_x = 0, win_y = 0, outer_x = 0, outer_y = 0; | 215 | int win_x = 0, win_y = 0, outer_x = 0, outer_y = 0; |
| 216 | int real_x = 0, real_y = 0; | 216 | int real_x = 0, real_y = 0; |
| 217 | bool had_errors = false; | 217 | bool had_errors = false; |
| 218 | Window win = (FRAME_PARENT_FRAME (f) | 218 | struct frame *parent_frame = FRAME_PARENT_FRAME (f); |
| 219 | ? FRAME_X_WINDOW (FRAME_PARENT_FRAME (f)) | 219 | Window win = (parent_frame |
| 220 | ? FRAME_X_WINDOW (parent_frame) | ||
| 220 | : f->output_data.x->parent_desc); | 221 | : f->output_data.x->parent_desc); |
| 221 | struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); | 222 | struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); |
| 222 | long max_len = 400; | 223 | long max_len = 400; |
| @@ -355,8 +356,8 @@ x_real_pos_and_offsets (struct frame *f, | |||
| 355 | outer_geom_cookie = xcb_get_geometry (xcb_conn, | 356 | outer_geom_cookie = xcb_get_geometry (xcb_conn, |
| 356 | FRAME_OUTER_WINDOW (f)); | 357 | FRAME_OUTER_WINDOW (f)); |
| 357 | 358 | ||
| 358 | if ((dpyinfo->root_window == f->output_data.x->parent_desc) | 359 | if (!parent_frame |
| 359 | && !FRAME_PARENT_FRAME (f)) | 360 | && dpyinfo->root_window == f->output_data.x->parent_desc) |
| 360 | /* Try _NET_FRAME_EXTENTS if our parent is the root window. */ | 361 | /* Try _NET_FRAME_EXTENTS if our parent is the root window. */ |
| 361 | prop_cookie = xcb_get_property (xcb_conn, 0, win, | 362 | prop_cookie = xcb_get_property (xcb_conn, 0, win, |
| 362 | dpyinfo->Xatom_net_frame_extents, | 363 | dpyinfo->Xatom_net_frame_extents, |
| @@ -470,8 +471,7 @@ x_real_pos_and_offsets (struct frame *f, | |||
| 470 | #endif | 471 | #endif |
| 471 | } | 472 | } |
| 472 | 473 | ||
| 473 | if ((dpyinfo->root_window == f->output_data.x->parent_desc) | 474 | if (!parent_frame && dpyinfo->root_window == f->output_data.x->parent_desc) |
| 474 | && !FRAME_PARENT_FRAME (f)) | ||
| 475 | { | 475 | { |
| 476 | /* Try _NET_FRAME_EXTENTS if our parent is the root window. */ | 476 | /* Try _NET_FRAME_EXTENTS if our parent is the root window. */ |
| 477 | #ifdef USE_XCB | 477 | #ifdef USE_XCB |