diff src/gui_at_sb.c @ 1757:f10fe14748e2 v7.2.055

updated for version 7.2-055
author vimboss
date Fri, 28 Nov 2008 20:29:07 +0000
parents 3fc0f57ecb91
children fc89a4f98a8b
line wrap: on
line diff
--- a/src/gui_at_sb.c
+++ b/src/gui_at_sb.c
@@ -1078,6 +1078,12 @@ NotifyThumb(w, event, params, num_params
     Cardinal	*num_params;	/* unused */
 {
     ScrollbarWidget sbw = (ScrollbarWidget)w;
+    /* Use a union to avoid a warning for the weird conversion from float to
+     * XtPointer.  Comes from Xaw/Scrollbar.c. */
+    union {
+	XtPointer xtp;
+	float xtf;
+    } xtpf;
 
     if (LookAhead(w, event))
 	return;
@@ -1085,7 +1091,8 @@ NotifyThumb(w, event, params, num_params
     /* thumbProc is not pretty, but is necessary for backwards
        compatibility on those architectures for which it work{s,ed};
        the intent is to pass a (truncated) float by value. */
-    XtCallCallbacks(w, XtNthumbProc, *(XtPointer*)&sbw->scrollbar.top);
+    xtpf.xtf = sbw->scrollbar.top;
+    XtCallCallbacks(w, XtNthumbProc, xtpf.xtp);
     XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
 }