vrend_renderer.c: fix warnings

vrend_renderer.c: in function »vrend_renderer_resource_create«:
vrend_renderer.c:4735:35: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
             for (level = 0; level <= args->last_level; level++) {
                                   ^~
vrend_renderer.c:4745:32: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
          for (level = 0; level <= args->last_level; level++) {
                                ^~
vrend_renderer.c:4756:32: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
          for (level = 0; level <= args->last_level; level++) {
                                ^~
vrend_renderer.c:4763:32: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
          for (level = 0; level <= args->last_level; level++) {
                                ^~
vrend_renderer.c: in function »read_transfer_data«:
vrend_renderer.c:4893:27: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
             for (h = 0; h < bh; h++) {
                           ^
vrend_renderer.c: in function »write_transfer_data«:
vrend_renderer.c:4936:24: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
          for (h = 0; h < bh; h++) {
                        ^
vrend_renderer.c: in function »check_transfer_bounds«:
vrend_renderer.c:4981:28: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
       if (info->box->depth > res->base.array_size)
                            ^
vrend_renderer.c:4983:24: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
       if (info->box->z > res->base.array_size)
                        ^
vrend_renderer.c:4985:43: warning: comparison between
signed and unsigned integer expressions[-Wsign-compare]
       if (info->box->z + info->box->depth > res->base.array_size)

v2: Correct language of warnings

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 9e00a70402
commit b116ed8f9b
  1. 12
      src/vrend_renderer.c

@ -4610,7 +4610,7 @@ static void vrend_create_buffer(struct vrend_resource *gr, uint32_t width)
int vrend_renderer_resource_create(struct vrend_renderer_resource_create_args *args, struct iovec *iov, uint32_t num_iovs)
{
struct vrend_resource *gr;
int level;
uint32_t level;
int ret;
ret = check_resource_valid(args);
@ -4894,7 +4894,7 @@ static void read_transfer_data(struct pipe_resource *res,
uint32_t send_size = util_format_get_nblocks(res->format, box->width,
box->height) * blsize * box->depth;
uint32_t bwx = util_format_get_nblocksx(res->format, box->width) * blsize;
uint32_t bh = util_format_get_nblocksy(res->format, box->height);
int32_t bh = util_format_get_nblocksy(res->format, box->height);
int d, h;
if ((send_size == size || bh == 1) && !invert && box->depth == 1)
@ -4937,7 +4937,7 @@ static void write_transfer_data(struct pipe_resource *res,
uint32_t send_size = util_format_get_nblocks(res->format, box->width,
box->height) * blsize * box->depth;
uint32_t bwx = util_format_get_nblocksx(res->format, box->width) * blsize;
uint32_t bh = util_format_get_nblocksy(res->format, box->height);
int32_t bh = util_format_get_nblocksy(res->format, box->height);
int d, h;
uint32_t stride = dst_stride ? dst_stride : util_format_get_nblocksx(res->format, u_minify(res->width0, level)) * blsize;
@ -5000,11 +5000,11 @@ static bool check_transfer_bounds(struct vrend_resource *res,
if (info->box->z + info->box->depth > ldepth)
return false;
} else {
if (info->box->depth > res->base.array_size)
if (info->box->depth > (int)res->base.array_size)
return false;
if (info->box->z > res->base.array_size)
if (info->box->z > (int)res->base.array_size)
return false;
if (info->box->z + info->box->depth > res->base.array_size)
if (info->box->z + info->box->depth > (int)res->base.array_size)
return false;
}

Loading…
Cancel
Save