Pacify gcc -Wdouble-precision when using Xaw.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 31 May 2012 06:51:43 +0000 (23:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 31 May 2012 06:51:43 +0000 (23:51 -0700)
* 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.

src/ChangeLog
src/xterm.c

index 8622adb..67c1006 100644 (file)
@@ -1,3 +1,11 @@
+2012-05-31  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <eliz@gnu.org>
 
        * xdisp.c (handle_stop): Detect whether we have overlay strings
index 8172691..3c7a7ef 100644 (file)
@@ -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