[PATCH 9/9] ephyr: Fix warning about XID vs unsigned long * by changing function args
Eric Anholt
eric at anholt.net
Sat Aug 17 15:36:43 PDT 2013
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.
---
hw/kdrive/ephyr/ephyrdri.c | 5 +++--
hw/kdrive/ephyr/ephyrdri.h | 2 +-
hw/kdrive/ephyr/ephyrdriext.c | 4 +---
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/kdrive/ephyr/ephyrdri.c b/hw/kdrive/ephyr/ephyrdri.c
index 5055436..3a4a063 100644
--- a/hw/kdrive/ephyr/ephyrdri.c
+++ b/hw/kdrive/ephyr/ephyrdri.c
@@ -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;
}
diff --git a/hw/kdrive/ephyr/ephyrdri.h b/hw/kdrive/ephyr/ephyrdri.h
index d28910f..8f2d302 100644
--- a/hw/kdrive/ephyr/ephyrdri.h
+++ b/hw/kdrive/ephyr/ephyrdri.h
@@ -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);
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 4db40e3..617ffb1 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -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;
}
--
1.8.4.rc2
More information about the xorg-devel
mailing list