ephyr: Fix warning about XID vs unsigned long * by changing function args

There's no reason to pass the data back out to the caller, since the
caller was dropping it on the floor.  The original data is a CARD32,
so no need to mess with weird unsigned longs.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Eric Anholt 2013-08-17 14:50:37 +02:00
parent f1cefe020b
commit e01a3f65d3
3 changed files with 5 additions and 6 deletions

View File

@ -137,18 +137,19 @@ ephyrDRIGetClientDriverName(int a_screen,
Bool
ephyrDRICreateContext(int a_screen,
int a_visual_id,
XID *a_returned_ctxt_id, drm_context_t * a_hw_ctxt)
CARD32 ctxt_id, drm_context_t * a_hw_ctxt)
{
Display *dpy = hostx_get_display();
Bool is_ok = FALSE;
Visual v;
XID returned_ctxt_id = ctxt_id;
EPHYR_LOG("enter. screen:%d, visual:%d\n", a_screen, a_visual_id);
memset(&v, 0, sizeof(v));
v.visualid = a_visual_id;
is_ok = XF86DRICreateContext(dpy,
DefaultScreen(dpy),
&v, a_returned_ctxt_id, a_hw_ctxt);
&v, &returned_ctxt_id, a_hw_ctxt);
EPHYR_LOG("leave:%d\n", is_ok);
return is_ok;
}

View File

@ -43,7 +43,7 @@ Bool ephyrDRIGetClientDriverName(int a_screen,
char **a_client_driver_name);
Bool ephyrDRICreateContext(int a_screen,
int a_visual_id,
XID *a_returned_ctx_id, drm_context_t * a_hw_ctx);
CARD32 ctx_id, drm_context_t * a_hw_ctx);
Bool ephyrDRIDestroyContext(int a_screen, int a_context_id);
Bool ephyrDRICreateDrawable(int a_screen,
int a_drawable, drm_drawable_t * a_hw_drawable);

View File

@ -716,7 +716,6 @@ ProcXF86DRICreateContext(register ClientPtr client)
ScreenPtr pScreen;
VisualPtr visual;
int i = 0;
unsigned long context_id = 0;
REQUEST(xXF86DRICreateContextReq);
REQUEST_SIZE_MATCH(xXF86DRICreateContextReq);
@ -739,10 +738,9 @@ ProcXF86DRICreateContext(register ClientPtr client)
return BadValue;
}
context_id = stuff->context;
if (!ephyrDRICreateContext(stuff->screen,
stuff->visual,
&context_id,
stuff->context,
(drm_context_t *) &rep.hHWContext)) {
return BadValue;
}