From 51d8ac283749201ef521d7a46d409ee14412747b Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 17 Sep 2006 10:46:09 +0000 Subject: [PATCH] * lib/xlib: fix invalid pointer-int casts. git-svn-id: svn://svn.zoy.org/elk/trunk@270 55e467fa-43c5-0310-a8a2-de718669efc6 --- lib/xlib/color.c | 2 +- lib/xlib/display.c | 3 ++- lib/xlib/gcontext.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/xlib/color.c b/lib/xlib/color.c index d8f4f2b..63c57fa 100644 --- a/lib/xlib/color.c +++ b/lib/xlib/color.c @@ -37,7 +37,7 @@ static int Color_Equal (Object x, Object y) { return p->red == q->red && p->green == q->green && p->blue == q->blue; } -Generic_Print (Color, "#[color %lu]", POINTER(x)) +Generic_Print (Color, "#[color %lu]", (unsigned int)(uintptr_t)POINTER(x)) Object Make_Color (unsigned int r, unsigned int g, unsigned int b) { Object c; diff --git a/lib/xlib/display.c b/lib/xlib/display.c index 77a41fd..12fc568 100644 --- a/lib/xlib/display.c +++ b/lib/xlib/display.c @@ -43,7 +43,8 @@ Generic_Equal (Display, DISPLAY, dpy) static int Display_Print (Object d, Object port, int raw, int depth, int length) { - Printf (port, "#[display %lu %s]", (unsigned)DISPLAY(d)->dpy, + Printf (port, "#[display %lu %s]", + (unsigned long)(uintptr_t)DISPLAY(d)->dpy, DisplayString (DISPLAY(d)->dpy)); return 0; } diff --git a/lib/xlib/gcontext.c b/lib/xlib/gcontext.c index f332e58..9162c8d 100644 --- a/lib/xlib/gcontext.c +++ b/lib/xlib/gcontext.c @@ -36,7 +36,7 @@ Generic_Predicate (Gc) Generic_Equal_Dpy (Gc, GCONTEXT, gc) -Generic_Print (Gc, "#[gcontext %lu]", GCONTEXT(x)->gc) +Generic_Print (Gc, "#[gcontext %lu]", (unsigned int)(uintptr_t)GCONTEXT(x)->gc) Generic_Get_Display (Gc, GCONTEXT)