qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: andrzej zaborowski <balrogg@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] (dont commit) virtio-gl-fixes for build on F17
Date: Thu, 12 Jan 2012 12:42:22 +0200	[thread overview]
Message-ID: <20120112104222.GE5762@garlic.tlv.redhat.com> (raw)
In-Reply-To: <CAOq732+UEnivMz+GBxOCath94jA9nz8FXB2tDpcmrirwmOQW_w@mail.gmail.com>

On Tue, Jan 10, 2012 at 08:13:00PM +0100, andrzej zaborowski wrote:
> On 10 January 2012 09:44, Alon Levy <alevy@redhat.com> 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

  reply	other threads:[~2012-01-12 10:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09  7:57 [Qemu-devel] [PATCH 0/6] OpenGL passthrough support once again Andrzej Zaborowski
2012-01-09  7:57 ` [Qemu-devel] [PATCH 1/6] gl: Add an OpenGL offscreen rendering API and backends Andrzej Zaborowski
2012-01-09  7:57 ` [Qemu-devel] [PATCH 3/6] gl: OpenGL passthrough implementation Andrzej Zaborowski
2012-01-09  7:57 ` [Qemu-devel] [PATCH 2/6] gl: Add mesa OpenGL headers Andrzej Zaborowski
2012-01-09  7:57 ` [Qemu-devel] [PATCH 4/6] virtio-serial: Call .guest_ready when new space is available in the queue Andrzej Zaborowski
2012-01-09  7:57 ` [Qemu-devel] [PATCH 5/6] gl: virtio-serial port driver for OpenGL passthrough Andrzej Zaborowski
2012-01-09  7:57 ` [Qemu-devel] [PATCH 6/6] gl: -enable-gl switch to enable the GL virtio port Andrzej Zaborowski
2012-01-10  8:29 ` [Qemu-devel] [PATCH 0/6] OpenGL passthrough support once again Alon Levy
2012-01-10 19:05   ` andrzej zaborowski
2012-01-10  8:44 ` [Qemu-devel] [PATCH] (dont commit) virtio-gl-fixes for build on F17 Alon Levy
2012-01-10 19:13   ` andrzej zaborowski
2012-01-12 10:42     ` Alon Levy [this message]
2012-01-12 13:18       ` andrzej zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120112104222.GE5762@garlic.tlv.redhat.com \
    --to=alevy@redhat.com \
    --cc=balrogg@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).