diff options
| author | Martin Rudalics | 2017-08-31 10:00:23 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2017-08-31 10:00:23 +0200 |
| commit | 7bb75e3d8194c2349bfa4479fd72e10f31bea0a5 (patch) | |
| tree | 3e444ba5e75905c612c5b72908e49d3b6408418c /src | |
| parent | f44184f1c34fed8e6e1db93de37d3ea76419c5ac (diff) | |
| download | emacs-7bb75e3d8194c2349bfa4479fd72e10f31bea0a5.tar.gz emacs-7bb75e3d8194c2349bfa4479fd72e10f31bea0a5.zip | |
In xterm.c fix some recently introduced compiler warnings
* src/xterm.c (xaw_jump_callback)
(x_set_toolkit_scroll_bar_thumb): Fix some recently introduced
-Wdouble-promotion warnings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c index b7dc884fa69..a7a52064a10 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -5727,12 +5727,11 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) | |||
| 5727 | struct scroll_bar *bar = client_data; | 5727 | struct scroll_bar *bar = client_data; |
| 5728 | float *top_addr = call_data; | 5728 | float *top_addr = call_data; |
| 5729 | double top = *top_addr; | 5729 | double top = *top_addr; |
| 5730 | float shown; | 5730 | double shown; |
| 5731 | int whole, portion, height, width; | 5731 | int whole, portion, height, width; |
| 5732 | enum scroll_bar_part part; | 5732 | enum scroll_bar_part part; |
| 5733 | bool horizontal = bar->horizontal; | 5733 | bool horizontal = bar->horizontal; |
| 5734 | 5734 | ||
| 5735 | |||
| 5736 | if (horizontal) | 5735 | if (horizontal) |
| 5737 | { | 5736 | { |
| 5738 | /* Get the size of the thumb, a value between 0 and 1. */ | 5737 | /* Get the size of the thumb, a value between 0 and 1. */ |
| @@ -6367,8 +6366,9 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio | |||
| 6367 | } | 6366 | } |
| 6368 | 6367 | ||
| 6369 | { | 6368 | { |
| 6370 | float old_top, old_shown; | 6369 | double old_top, old_shown; |
| 6371 | Dimension height; | 6370 | Dimension height; |
| 6371 | |||
| 6372 | XtVaGetValues (widget, | 6372 | XtVaGetValues (widget, |
| 6373 | XtNtopOfThumb, &old_top, | 6373 | XtNtopOfThumb, &old_top, |
| 6374 | XtNshown, &old_shown, | 6374 | XtNshown, &old_shown, |
| @@ -6395,7 +6395,8 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio | |||
| 6395 | /* If the call to XawScrollbarSetThumb below doesn't seem to | 6395 | /* If the call to XawScrollbarSetThumb below doesn't seem to |
| 6396 | work, check that 'NARROWPROTO' is defined in src/config.h. | 6396 | work, check that 'NARROWPROTO' is defined in src/config.h. |
| 6397 | If this is not so, most likely you need to fix configure. */ | 6397 | If this is not so, most likely you need to fix configure. */ |
| 6398 | float ftop = top, fshown = shown; | 6398 | double ftop = top, fshown = shown; |
| 6399 | |||
| 6399 | if (ftop != old_top || fshown != old_shown) | 6400 | if (ftop != old_top || fshown != old_shown) |
| 6400 | { | 6401 | { |
| 6401 | if (bar->dragging == -1) | 6402 | if (bar->dragging == -1) |