diff options
author | Martin Rudalics <rudalics@gmx.at> | 2017-08-31 10:00:23 +0200 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2017-08-31 10:00:23 +0200 |
commit | 7bb75e3d8194c2349bfa4479fd72e10f31bea0a5 (patch) | |
tree | 3e444ba5e75905c612c5b72908e49d3b6408418c /src/xterm.c | |
parent | f44184f1c34fed8e6e1db93de37d3ea76419c5ac (diff) | |
download | emacs-7bb75e3d8194c2349bfa4479fd72e10f31bea0a5.tar.gz emacs-7bb75e3d8194c2349bfa4479fd72e10f31bea0a5.tar.bz2 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/xterm.c')
-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) struct scroll_bar *bar = client_data; float *top_addr = call_data; double top = *top_addr; - float shown; + double shown; int whole, portion, height, width; enum scroll_bar_part part; bool horizontal = bar->horizontal; - if (horizontal) { /* 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 } { - float old_top, old_shown; + double old_top, old_shown; Dimension height; + XtVaGetValues (widget, XtNtopOfThumb, &old_top, XtNshown, &old_shown, @@ -6395,7 +6395,8 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio /* If the call to XawScrollbarSetThumb below doesn't seem to work, check that 'NARROWPROTO' is defined in src/config.h. If this is not so, most likely you need to fix configure. */ - float ftop = top, fshown = shown; + double ftop = top, fshown = shown; + if (ftop != old_top || fshown != old_shown) { if (bar->dragging == -1) |