summaryrefslogtreecommitdiff
path: root/src/gui_at_sb.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-11-28 20:29:07 +0000
committerBram Moolenaar <Bram@vim.org>2008-11-28 20:29:07 +0000
commitfe86f2d7cdb284f18543cac2e6cbbe11352c7f48 (patch)
tree9b8155ee2c3fe3142e4258590d210451db55db1f /src/gui_at_sb.c
parenta40b46614a54de01a74d37a771db4dbfa44afee9 (diff)
downloadvim-git-fe86f2d7cdb284f18543cac2e6cbbe11352c7f48.tar.gz
updated for version 7.2-055v7.2.055
Diffstat (limited to 'src/gui_at_sb.c')
-rw-r--r--src/gui_at_sb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui_at_sb.c b/src/gui_at_sb.c
index 5fe3afbbe..1726953a2 100644
--- 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);
}