vrend_renderer.c: Fix warnings

vrend_renderer.c: In Funktion »vrend_resource_copy_fallback«:
vrend_renderer.c:5902:100: Warnung: signed and unsigned type in
conditional expression [-Wsign-compare]
       GLenum ctarget = src_res->target == GL_TEXTURE_CUBE_MAP ?
       GL_TEXTURE_CUBE_MAP_POSITIVE_X + i : src_res->target;

vrend_renderer.c:5943:100: Warnung: signed and unsigned type in
conditional expression [-Wsign-compare]
       GLenum ctarget = dst_res->target == GL_TEXTURE_CUBE_MAP ?
       GL_TEXTURE_CUBE_MAP_POSITIVE_X + i : dst_res->target;

vrend_renderer.c: In Funktion »vrend_create_query«:
vrend_renderer.c:6404:54: Warnung: unused parameter »offset« [-Wunused-
parameter]
                        uint32_t res_handle, uint32_t offset)
                                                      ^~~~~~
vrend_renderer.c: In Funktion »vrend_get_query_result«:
vrend_renderer.c:6528:38: Warnung: unused parameter »wait« [-Wunused-
parameter]
                             uint32_t wait)
                                      ^~~~
vrend_renderer.c: In Funktion »vrend_renderer_fill_caps_common«:
vrend_renderer.c:6659:68: Warnung: unused parameter »version« [-Wunused-
parameter]
 static bool vrend_renderer_fill_caps_common(uint32_t set, uint32_t
version,
                                                                    ^~~~~~~
vrend_renderer.c: In Funktion »vrend_renderer_fill_caps_gles«:
vrend_renderer.c:6769:66: Warnung: unused parameter »version« [-Wunused-
parameter]
 static void vrend_renderer_fill_caps_gles(uint32_t set, uint32_t
version,
                                                                  ^~~~~~~
vrend_renderer.c: In Funktion »vrend_renderer_get_cursor_contents«:
vrend_renderer.c:7184:18: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
    for (h = 0; h < res->base.height0; h++) {
                  ^
v2: Use mesa style UNUSED annotation for unused parameters

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 7 years ago committed by Jakob Bornecrantz
parent 567c91cb29
commit a52d2ef49a
  1. 16
      src/vrend_renderer.c

@ -5913,7 +5913,8 @@ static void vrend_resource_copy_fallback(struct vrend_context *ctx,
slice_offset = 0;
for (i = 0; i < cube_slice; i++) {
GLenum ctarget = src_res->target == GL_TEXTURE_CUBE_MAP ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + i : src_res->target;
GLenum ctarget = src_res->target == GL_TEXTURE_CUBE_MAP ?
(GLenum)(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i) : src_res->target;
if (compressed) {
if (vrend_state.have_arb_robustness)
glGetnCompressedTexImageARB(ctarget, src_level, transfer_size, tptr + slice_offset);
@ -5954,7 +5955,8 @@ static void vrend_resource_copy_fallback(struct vrend_context *ctx,
cube_slice = (src_res->target == GL_TEXTURE_CUBE_MAP) ? src_box->z + src_box->depth : cube_slice;
i = (src_res->target == GL_TEXTURE_CUBE_MAP) ? src_box->z : 0;
for (; i < cube_slice; i++) {
GLenum ctarget = dst_res->target == GL_TEXTURE_CUBE_MAP ? GL_TEXTURE_CUBE_MAP_POSITIVE_X + i : dst_res->target;
GLenum ctarget = dst_res->target == GL_TEXTURE_CUBE_MAP ?
(GLenum)(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i) : dst_res->target;
if (compressed) {
if (ctarget == GL_TEXTURE_1D) {
glCompressedTexSubImage1D(ctarget, dst_level, dstx,
@ -6415,7 +6417,7 @@ uint32_t vrend_renderer_object_insert(struct vrend_context *ctx, void *data,
int vrend_create_query(struct vrend_context *ctx, uint32_t handle,
uint32_t query_type, uint32_t query_index,
uint32_t res_handle, uint32_t offset)
uint32_t res_handle, UNUSED uint32_t offset)
{
struct vrend_query *q;
struct vrend_resource *res;
@ -6539,7 +6541,7 @@ void vrend_end_query(struct vrend_context *ctx, uint32_t handle)
}
void vrend_get_query_result(struct vrend_context *ctx, uint32_t handle,
uint32_t wait)
UNUSED uint32_t wait)
{
struct vrend_query *q;
bool ret;
@ -6670,7 +6672,7 @@ static void vrender_get_glsl_version(int *glsl_version)
* Does all of the common caps setting,
* if it dedects a early out returns true.
*/
static bool vrend_renderer_fill_caps_common(uint32_t set, uint32_t version,
static bool vrend_renderer_fill_caps_common(uint32_t set, UNUSED uint32_t version,
union virgl_caps *caps)
{
int i, gl_ver;
@ -6780,7 +6782,7 @@ static bool vrend_renderer_fill_caps_common(uint32_t set, uint32_t version,
return false;
}
static void vrend_renderer_fill_caps_gles(uint32_t set, uint32_t version,
static void vrend_renderer_fill_caps_gles(uint32_t set, UNUSED uint32_t version,
union virgl_caps *caps)
{
GLint max;
@ -7130,7 +7132,7 @@ void *vrend_renderer_get_cursor_contents(uint32_t res_handle, uint32_t *width, u
int blsize;
char *data, *data2;
int size;
int h;
uint h;
res = vrend_resource_lookup(res_handle, 0);
if (!res)

Loading…
Cancel
Save