diff options
| author | Paul Eggert | 2016-07-13 09:56:50 +0200 |
|---|---|---|
| committer | Paul Eggert | 2016-07-13 10:17:34 +0200 |
| commit | 66da81e577a7177c0595dbbc6b2e974740a19a42 (patch) | |
| tree | d272690fef88ed6896b09c1110b307d656bf260b /src | |
| parent | cff2f4606dfbc83f8e38a6b7a48eedcc47009a3b (diff) | |
| download | emacs-66da81e577a7177c0595dbbc6b2e974740a19a42.tar.gz emacs-66da81e577a7177c0595dbbc6b2e974740a19a42.zip | |
Port xwidget.c to GCC 6 with --enable-gcc-warnings
* src/xwidget.c (x_draw_xwidget_glyph_string, xwidget_end_redisplay):
Adjust to pacify GCC. Add a couple of FIXME comments, suggesting
possible bugs found by GCC.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xwidget.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/xwidget.c b/src/xwidget.c index 82449f7a215..9c505106144 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -565,12 +565,16 @@ x_draw_xwidget_glyph_string (struct glyph_string *s) | |||
| 565 | xwidget on screen. Moving and clipping is done here. Also view | 565 | xwidget on screen. Moving and clipping is done here. Also view |
| 566 | initialization. */ | 566 | initialization. */ |
| 567 | struct xwidget *xww = s->xwidget; | 567 | struct xwidget *xww = s->xwidget; |
| 568 | struct xwidget_view *xv = xwidget_view_lookup (xww, s->w); | 568 | struct xwidget_view *xv; |
| 569 | int clip_right; | 569 | int clip_right; |
| 570 | int clip_bottom; | 570 | int clip_bottom; |
| 571 | int clip_top; | 571 | int clip_top; |
| 572 | int clip_left; | 572 | int clip_left; |
| 573 | 573 | ||
| 574 | /* FIXME: The result of this call is discarded. | ||
| 575 | What if the lookup fails? */ | ||
| 576 | xwidget_view_lookup (xww, s->w); | ||
| 577 | |||
| 574 | int x = s->x; | 578 | int x = s->x; |
| 575 | int y = s->y + (s->height / 2) - (xww->height / 2); | 579 | int y = s->y + (s->height / 2) - (xww->height / 2); |
| 576 | 580 | ||
| @@ -1145,7 +1149,13 @@ xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix) | |||
| 1145 | { | 1149 | { |
| 1146 | /* The only call to xwidget_end_redisplay is in dispnew. | 1150 | /* The only call to xwidget_end_redisplay is in dispnew. |
| 1147 | xwidget_end_redisplay (w->current_matrix); */ | 1151 | xwidget_end_redisplay (w->current_matrix); */ |
| 1148 | xwidget_touch (xwidget_view_lookup (glyph->u.xwidget, w)); | 1152 | struct xwidget_view *xv |
| 1153 | = xwidget_view_lookup (glyph->u.xwidget, w); | ||
| 1154 | /* FIXME: Is it safe to assume xwidget_view_lookup | ||
| 1155 | always succeeds here? If so, this comment can be removed. | ||
| 1156 | If not, the code probably needs fixing. */ | ||
| 1157 | eassume (xv); | ||
| 1158 | xwidget_touch (xv); | ||
| 1149 | } | 1159 | } |
| 1150 | } | 1160 | } |
| 1151 | } | 1161 | } |