From: Paul Eggert Date: Thu, 31 May 2012 06:51:43 +0000 (-0700) Subject: Pacify gcc -Wdouble-precision when using Xaw. X-Git-Tag: emacs-24.2.90~471^2~6^2~40 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca34e0be92d5e715c5d65b990917d2ecd15da318;p=emacs.git Pacify gcc -Wdouble-precision when using Xaw. * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb) [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]: Use 'float' consistently, rather than 'float' in most places and 'double' in a couple of places. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8622adbf0ce..67c100600fa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2012-05-31 Paul Eggert + + Pacify gcc -Wdouble-precision when using Xaw. + * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb) + [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]: + Use 'float' consistently, rather than 'float' in most places + and 'double' in a couple of places. + 2012-05-31 Eli Zaretskii * xdisp.c (handle_stop): Detect whether we have overlay strings diff --git a/src/xterm.c b/src/xterm.c index 81726917efa..3c7a7efdd71 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4529,7 +4529,7 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) whole = 10000000; portion = shown < 1 ? top * whole : 0; - if (shown < 1 && (eabs (top + shown - 1) < 1.0/height)) + if (shown < 1 && (eabs (top + shown - 1) < 1.0f / height)) /* Some derivatives of Xaw refuse to shrink the thumb when you reach the bottom, so we force the scrolling whenever we see that we're too close to the bottom (in x_set_toolkit_scroll_bar_thumb @@ -4894,7 +4894,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio else top = old_top; /* Keep two pixels available for moving the thumb down. */ - shown = max (0, min (1 - top - (2.0 / height), shown)); + shown = max (0, min (1 - top - (2.0f / height), shown)); /* If the call to XawScrollbarSetThumb below doesn't seem to work, check that your system's configuration file contains a define