PATCH 21.5
On Tue, Jan 6, 2015 at 9:19 AM, Marcus <marcus.harnisch(a)xemacs.org> wrote:
 Jerry James <james(a)xemacs.org> writes:
> Does the compile succeed if you cast to long first, then to int?
 Indeed, it does. The secrets of "why" are part of the C++ standard, I
 reckon. I am not even getting a warning despite the fact that casting
 long to int is lossy. 
Stephen already explained the whys and wherefores, so I'll just paste
the patch in here for public consideration.
diff -r 9e5f3a0d4e66 lwlib/ChangeLog
--- a/lwlib/ChangeLog Sat Jan 03 16:24:56 2015 +0100
+++ b/lwlib/ChangeLog Wed Jan 07 09:14:09 2015 -0700
@@ -1,3 +1,8 @@
+2015-01-07  Jerry James  <james(a)xemacs.org>
+
+ * lwlib-Xaw.c (xaw_scrollbar_scroll): Add typecast to fix g++ build,
+ problem reported by Marcus Harnisch.
+
 2013-06-23  Stephen J. Turnbull  <stephen(a)xemacs.org>
  * XEmacs 21.5.34 "kale" is released.
diff -r 9e5f3a0d4e66 lwlib/lwlib-Xaw.c
--- a/lwlib/lwlib-Xaw.c Sat Jan 03 16:24:56 2015 +0100
+++ b/lwlib/lwlib-Xaw.c Wed Jan 07 09:14:09 2015 -0700
@@ -613,10 +613,10 @@
     return;
   id = instance->info->id;
-  event_data.slider_value = (int) call_data;
+  event_data.slider_value = (int) (long) call_data;
   event_data.time = 0;
-  if ((int) call_data > 0)
+  if ((int) (long) call_data > 0)
     /* event_data.action = SCROLLBAR_PAGE_DOWN;*/
     event_data.action = SCROLLBAR_LINE_DOWN;
   else
-- 
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta