OSDN Git Service

glx: change query_renderer_integer() value param to unsigned
authorBrian Paul <brianp@vmware.com>
Fri, 8 Nov 2013 16:00:46 +0000 (09:00 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 11 Nov 2013 15:10:12 +0000 (08:10 -0700)
When this function was added, the returned value was signed in some
places, unsigned in others.

v2: also add unsigned in the unit test, per Ian.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glx/glxclient.h
src/glx/query_renderer.c
src/glx/tests/query_renderer_unittest.cpp

index e26a83e..e33dba6 100644 (file)
@@ -477,7 +477,7 @@ struct glx_screen_vtable {
                                                 unsigned *error);
    int (*query_renderer_integer)(struct glx_screen *psc,
                                  int attribute,
-                                 int *value);
+                                 unsigned int *value);
    int (*query_renderer_string)(struct glx_screen *psc,
                                 int attribute,
                                 const char **value);
index 981a844..9108ec2 100644 (file)
@@ -30,7 +30,7 @@ __glXQueryRendererInteger(struct glx_screen *psc, int attribute,
                           unsigned int *value)
 {
    unsigned int values_for_query = 0;
-   int buffer[32];
+   unsigned int buffer[32];
    int err;
 
    /* This probably means the caller is trying to use an extension function
index f0998b7..2f3c4ef 100644 (file)
@@ -56,7 +56,8 @@ static bool query_renderer_string_called = false;
 static bool query_renderer_integer_called = false;
 
 static int
-fake_query_renderer_integer(struct glx_screen *psc, int attribute, int *value)
+fake_query_renderer_integer(struct glx_screen *psc, int attribute,
+                            unsigned int *value)
 {
    (void) psc;
    (void) attribute;