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)