On 06/25/13 02:02 PM, Thomas Klausner wrote:
Fixes:
warning: cast from function call of type 'char *' to non-matching
type 'XtArgVal' (aka 'long') [-Wbad-function-cast]
---
  src/Resources.c | 2 +-
  src/Varargs.c   | 4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Resources.c b/src/Resources.c
index 1d2871c..657c55d 100644
--- a/src/Resources.c
+++ b/src/Resources.c
@@ -738,7 +738,7 @@ static XtCacheRef *GetResources(
                     */

                    if(rx->xrm_size > sizeof(XtArgVal)) {
-                       arg->value = (XtArgVal) __XtMalloc(rx->xrm_size);
+                       arg->value = (XtArgVal)(void *) 
__XtMalloc(rx->xrm_size);

*sigh*  __XtMalloc should really be returning (void *), not (char *).

XtArgVal should not be defined to be "char *" on some platforms (well, CRAY),
"long" on others.

Xt should really just die in a fire as an unsalvageable mess of bad types.

I am really running out of reasons to give a crap about this any more, and
since no one else does either (at least from what I can tell by the lack of
anyone else doing patch reviews or commits), I may just follow their lead
and ignore this.

--
        -Alan Coopersmith-              alan.coopersm...@oracle.com
         Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to