vrend: Fix format warnings in vrend_shader.c

Fix compiler warnings about incorrect format type and possible format
overflow.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Alexandros Frantzis 7 years ago committed by Dave Airlie
parent b3296a37e1
commit 164ce41197
  1. 6
      src/vrend_shader.c

@ -921,7 +921,7 @@ static int emit_so_movs(struct dump_ctx *ctx)
char *sret; char *sret;
if (ctx->so->num_outputs >= PIPE_MAX_SO_OUTPUTS) { if (ctx->so->num_outputs >= PIPE_MAX_SO_OUTPUTS) {
fprintf(stderr, "Num outputs exceeded, max is %lu\n", PIPE_MAX_SO_OUTPUTS); fprintf(stderr, "Num outputs exceeded, max is %u\n", PIPE_MAX_SO_OUTPUTS);
return EINVAL; return EINVAL;
} }
@ -1646,7 +1646,7 @@ iter_instruction(struct tgsi_iterate_context *iter,
const struct tgsi_full_src_register *src = &inst->Src[i]; const struct tgsi_full_src_register *src = &inst->Src[i];
char swizzle[8] = {0}; char swizzle[8] = {0};
char prefix[6] = {0}; char prefix[6] = {0};
char arrayname[8] = {0}; char arrayname[9] = {0};
int swz_idx = 0, pre_idx = 0; int swz_idx = 0, pre_idx = 0;
boolean isabsolute = src->Register.Absolute; boolean isabsolute = src->Register.Absolute;
@ -2359,7 +2359,7 @@ static char *emit_ios(struct dump_ctx *ctx, char *glsl_hdr)
ctx->num_interps = 0; ctx->num_interps = 0;
if (ctx->so && ctx->so->num_outputs >= PIPE_MAX_SO_OUTPUTS) { if (ctx->so && ctx->so->num_outputs >= PIPE_MAX_SO_OUTPUTS) {
fprintf(stderr, "Num outputs exceeded, max is %lu\n", PIPE_MAX_SO_OUTPUTS); fprintf(stderr, "Num outputs exceeded, max is %u\n", PIPE_MAX_SO_OUTPUTS);
return NULL; return NULL;
} }

Loading…
Cancel
Save