[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] (dont commit) virtio-gl-fixes for build on F17
From: |
Alon Levy |
Subject: |
Re: [Qemu-devel] [PATCH] (dont commit) virtio-gl-fixes for build on F17 |
Date: |
Thu, 12 Jan 2012 12:42:22 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Jan 10, 2012 at 08:13:00PM +0100, andrzej zaborowski wrote:
> On 10 January 2012 09:44, Alon Levy <address@hidden> wrote:
> > All but the last are assigned but unused variables,
> > and an always true comparison, but the last looks like a logic
> > error - decode not returning the actual return value for the last call
> > in the buffer (vmgl-exec.c).
> > ---
> > gl/gloffscreen-xcomposite.c | 4 +---
> > gl/vmgl-exec.c | 10 +++++-----
> > 2 files changed, 6 insertions(+), 8 deletions(-)
> >
> > diff --git a/gl/gloffscreen-xcomposite.c b/gl/gloffscreen-xcomposite.c
> > index 5c63ed4..00a419b 100644
> > --- a/gl/gloffscreen-xcomposite.c
> > +++ b/gl/gloffscreen-xcomposite.c
> > @@ -186,8 +186,6 @@ static void glo_test_readback_methods(void)
> > /* Initialise gloffscreen */
> > int glo_init(void)
> > {
> > - XErrorHandler old_handler;
> > -
> > if (glo_inited) {
> > return 0;
> > }
> > @@ -204,7 +202,7 @@ int glo_init(void)
> > /* Safe because we are single threaded. Otherwise we cause recursion
> > * on the next call. Set the X error handler. */
> > glo_inited = 1;
> > - old_handler = XSetErrorHandler(x_errhandler);
> > + (void)XSetErrorHandler(x_errhandler);
> > glo_test_readback_methods();
> >
> > return 0;
> > diff --git a/gl/vmgl-exec.c b/gl/vmgl-exec.c
> > index e538ff4..3cf5eba 100644
> > --- a/gl/vmgl-exec.c
> > +++ b/gl/vmgl-exec.c
> > @@ -668,7 +668,7 @@ static int glXGetConfigFunc(uint32_t visualid, uint32_t
> > attrib, uint32_t *value)
> > {
> > const VmglGLXFBConfig *config = &fbconfigs[0];
> >
> > - if (visualid >= 0 && visualid < ARRAY_SIZE(fbconfigs)) {
> > + if (visualid < ARRAY_SIZE(fbconfigs)) {
> > config = &fbconfigs[visualid];
> > } else {
> > DEBUGF("Unknown visual ID %d\n", visualid);
> > @@ -3072,11 +3072,12 @@ static inline int do_decode_call(ProcessStruct *p,
> > const uint8_t *args_in,
> > int args_len, uint8_t *r_buffer)
> > {
> > Signature *signature;
> > - int i, ret;
> > - const uint8_t *arg_ptr, *tmp;
> > + int i;
> > + const uint8_t *arg_ptr;
> > static arg_t args[50];
> > int func_number;
> > ProcessState *process = DO_UPCAST(ProcessState, p, p);
> > + int ret = 1;
> >
> > if (!args_len) {
> > return 0;
> > @@ -3099,7 +3100,6 @@ static inline int do_decode_call(ProcessStruct *p,
> > const uint8_t *args_in,
> > #endif
> >
> > signature = (Signature *) tab_opengl_calls[func_number];
> > - tmp = arg_ptr;
> >
> > for (i = 0; i < signature->nb_args; i++) {
> > int args_size = *(const uint32_t *) arg_ptr;
> > @@ -3220,7 +3220,7 @@ static inline int do_decode_call(ProcessStruct *p,
> > const uint8_t *args_in,
> > }
> > #endif
> >
> > - return 1;
> > + return ret;
>
> Thanks for the compile test. I think I was meaning to check ret after
> every do_function_call call and return immediately if 0. I'll fix it
> in a future iteration and add your other fixes if you don't mind.
Don't mind at all! But for some reason this email and the other one I
send before it to you and to the qemu-devel list didn't reach the list.
If you saw this email is it too much to assume you saw the other one as
well?
>
> Cheers
- [Qemu-devel] [PATCH 1/6] gl: Add an OpenGL offscreen rendering API and backends., (continued)
- [Qemu-devel] [PATCH 1/6] gl: Add an OpenGL offscreen rendering API and backends., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 3/6] gl: OpenGL passthrough implementation., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 4/6] virtio-serial: Call .guest_ready when new space is available in the queue., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 5/6] gl: virtio-serial port driver for OpenGL passthrough., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 2/6] gl: Add mesa OpenGL headers., Andrzej Zaborowski, 2012/01/09
- [Qemu-devel] [PATCH 6/6] gl: -enable-gl switch to enable the GL virtio port., Andrzej Zaborowski, 2012/01/09
- Re: [Qemu-devel] [PATCH 0/6] OpenGL passthrough support once again, Alon Levy, 2012/01/11
- [Qemu-devel] [PATCH] (dont commit) virtio-gl-fixes for build on F17, Alon Levy, 2012/01/11