Bug#664934: libxaw: FTBFS: ../../src/XawIm.c:187:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
tags 664934 patch
user ubuntu-devel@lists.ubuntu.com
usertags 664934 ubuntu-patch precise
thanks
On Wed, Mar 21, 2012 at 09:28:14PM +0100, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build on
> amd64.
>
> Relevant part:
[...]
> > ../../src/XawIm.c: In function 'Destroy':
> > ../../src/XawIm.c:1410:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> > ../../src/XawIm.c:1415:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
Here's a backport of the upstream patch fixing this.
* Backport upstream patch to fix -Werror=pointer-to-int-cast errors
(closes: #664934).
diff -u libxaw-1.0.9/debian/patches/series libxaw-1.0.9/debian/patches/series
--- libxaw-1.0.9/debian/patches/series
+++ libxaw-1.0.9/debian/patches/series
@@ -1,0 +2 @@
+02_pointer_to_int_cast.diff
only in patch2:
unchanged:
--- libxaw-1.0.9.orig/debian/patches/02_pointer_to_int_cast.diff
+++ libxaw-1.0.9/debian/patches/02_pointer_to_int_cast.diff
@@ -0,0 +1,59 @@
+Description: Build fix for -Werror=pointer-to-int-cast
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Origin: backport, http://cgit.freedesktop.org/xorg/lib/libXaw/commit?id=49c0a2441946f0d70fbd2612f193c95b84dde102
+Bug-Debian: http://bugs.debian.org/664934
+Forwarded: not-needed
+Last-Update: 2012-04-02
+
+Index: b/src/XawIm.c
+===================================================================
+--- a/src/XawIm.c
++++ b/src/XawIm.c
+@@ -184,14 +184,14 @@
+ return(NULL);
+ }
+
+-static XContext extContext = (XContext)NULL;
++static XContext extContext = (XContext)0;
+
+ static XawVendorShellExtPart *
+ SetExtPart(VendorShellWidget w, XawVendorShellExtWidget vew)
+ {
+ contextDataRec *contextData;
+
+- if (extContext == (XContext)NULL) extContext = XUniqueContext();
++ if (extContext == (XContext)0) extContext = XUniqueContext();
+
+ contextData = XtNew(contextDataRec);
+ contextData->parent = (Widget)w;
+@@ -296,13 +296,13 @@
+ }
+ }
+
+-static XContext errContext = (XContext)NULL;
++static XContext errContext = (XContext)0;
+
+ static Widget SetErrCnxt(Widget w, XIM xim)
+ {
+ contextErrDataRec *contextErrData;
+
+- if (errContext == (XContext)NULL) errContext = XUniqueContext();
++ if (errContext == (XContext)0) errContext = XUniqueContext();
+
+ contextErrData = XtNew(contextErrDataRec);
+ contextErrData->widget = w;
+@@ -1407,12 +1407,12 @@
+ return;
+ XtFree( (char*) ve->im.resources );
+
+- if (extContext != (XContext)NULL &&
++ if (extContext != (XContext)0 &&
+ !XFindContext (XtDisplay (w), (Window)w,
+ extContext, (XPointer*)&contextData))
+ XtFree( (char*) contextData );
+
+- if (errContext != (XContext)NULL &&
++ if (errContext != (XContext)0 &&
+ !XFindContext (XDisplayOfIM( ve->im.xim ), (Window) ve->im.xim,
+ errContext, (XPointer*) &contextErrData))
+ XtFree( (char*) contextErrData );
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
Reply to: