From: Frédéric Dalleau Date: Tue, 3 Sep 2013 08:31:13 +0000 (+0200) Subject: VirtGL: Fix warnings about GlxClientDrawable X-Git-Tag: TizenStudio_2.0_p2.3~617^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8182a59865ceedce2055f379dd85b0b5928d646d;p=sdk%2Femulator%2Fqemu.git VirtGL: Fix warnings about GlxClientDrawable GlxClientDrawable is defined as void *, but only 32 bits values are used. Thus some weird warnings. Change-Id: Ic936f42ccd29533fb31591d4594b91e3e5ac06a2 --- diff --git a/tizen/src/hw/opengl_exec.c b/tizen/src/hw/opengl_exec.c index 46e14b9..7dd5665 100644 --- a/tizen/src/hw/opengl_exec.c +++ b/tizen/src/hw/opengl_exec.c @@ -29,6 +29,7 @@ #include #include #include +#include #include // for pid_t #include "qemu-common.h" @@ -204,7 +205,7 @@ typedef struct { #define MAX_CLIENT_STATE_STACK_SIZE 16 -typedef void *ClientGLXDrawable; +typedef uint32_t ClientGLXDrawable; typedef struct GLState GLState; @@ -222,7 +223,7 @@ enum { typedef struct QGloSurface { GLState *glstate; GloSurface *surface; - ClientGLXDrawable *client_drawable; + ClientGLXDrawable client_drawable; int type; /* window, pixmap or pbuffer */ int ready; int status; @@ -657,7 +658,6 @@ void init_process_tab() #include "server_stub.c" -//typedef void *ClientGLXDrawable; static inline ClientGLXDrawable to_drawable(arg_t arg) { #ifdef TARGET_X86_64 @@ -666,7 +666,7 @@ static inline ClientGLXDrawable to_drawable(arg_t arg) exit(-1); } #endif - return (void *) (unsigned long) arg; + return (ClientGLXDrawable)arg; } /* ---- */ @@ -2188,7 +2188,7 @@ int do_function_call(ProcessState *process, int func_number, unsigned long *args qsurface->surface, qsurface->type); - ret.i = client_drawable; + ret.i = (int)client_drawable; } break; @@ -2282,7 +2282,7 @@ int do_function_call(ProcessState *process, int func_number, unsigned long *args qsurface->surface = glo_surface_create(width, height, context); /* Use GloSurface handler as no input client_drawable, and * keep only low 32bit of handler on x86_64 host. */ - qsurface->client_drawable = (int)qsurface->surface; + qsurface->client_drawable = (ClientGLXDrawable)(long)qsurface->surface; qsurface->type = SURFACE_PBUFFER; qsurface->status = SURFACE_PENDING; /* qsurface->ref = 1;*/