diff options
author | Jan Vesely <[email protected]> | 2016-06-09 23:01:46 -0400 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-06-13 15:31:29 +0100 |
commit | 1fb4179f927442354f93dfc8494f0236e50af838 (patch) | |
tree | 9c021e857a74e60271c0b29222c46f5efe7c20a7 /src | |
parent | 112e988329b6af817b4892b530f703e7997b1d7d (diff) |
vl: Fix trivial sign compare warnings
v2: add whitepace fixes
Signed-off-by: Jan Vesely <[email protected]>
Acked-by: Jose Fonseca <[email protected]>
[Emil Velikov: squash a few more whitespace issues]
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_deint_filter.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_idct.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_matrix_filter.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_median_filter.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_vlc.h | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_zscan.c | 5 |
7 files changed, 15 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/vl/vl_deint_filter.c b/src/gallium/auxiliary/vl/vl_deint_filter.c index cf260092002..3ca3b49543d 100644 --- a/src/gallium/auxiliary/vl/vl_deint_filter.c +++ b/src/gallium/auxiliary/vl/vl_deint_filter.c @@ -447,7 +447,8 @@ vl_deint_filter_render(struct vl_deint_filter *filter, struct pipe_sampler_view *sampler_views[4]; struct pipe_surface **dst_surfaces; const unsigned *plane_order; - int i, j; + int i; + unsigned j; assert(filter && prevprev && prev && cur && next && field <= 1); diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c index deb97218545..3e6f581244e 100644 --- a/src/gallium/auxiliary/vl/vl_idct.c +++ b/src/gallium/auxiliary/vl/vl_idct.c @@ -321,13 +321,11 @@ static void * create_stage1_frag_shader(struct vl_idct *idct) { struct ureg_program *shader; - struct ureg_src l_addr[2], r_addr[2]; - struct ureg_dst l[4][2], r[2]; struct ureg_dst *fragment; - - int i, j; + unsigned i; + int j; shader = ureg_create(PIPE_SHADER_FRAGMENT); if (!shader) diff --git a/src/gallium/auxiliary/vl/vl_matrix_filter.c b/src/gallium/auxiliary/vl/vl_matrix_filter.c index e6d91326ad0..e331cb75856 100644 --- a/src/gallium/auxiliary/vl/vl_matrix_filter.c +++ b/src/gallium/auxiliary/vl/vl_matrix_filter.c @@ -85,7 +85,7 @@ create_frag_shader(struct vl_matrix_filter *filter, unsigned num_offsets, struct ureg_dst t_sum; struct ureg_dst o_fragment; bool first; - int i; + unsigned i; shader = ureg_create(PIPE_SHADER_FRAGMENT); if (!shader) { diff --git a/src/gallium/auxiliary/vl/vl_median_filter.c b/src/gallium/auxiliary/vl/vl_median_filter.c index 3d022ef9355..f7477b75739 100644 --- a/src/gallium/auxiliary/vl/vl_median_filter.c +++ b/src/gallium/auxiliary/vl/vl_median_filter.c @@ -84,7 +84,7 @@ create_frag_shader(struct vl_median_filter *filter, struct ureg_dst *t_array = MALLOC(sizeof(struct ureg_dst) * num_offsets); struct ureg_dst o_fragment; const unsigned median = num_offsets >> 1; - int i, j; + unsigned i, j; assert(num_offsets & 1); /* we need an odd number of offsets */ if (!(num_offsets & 1)) { /* yeah, we REALLY need an odd number of offsets!!! */ @@ -158,7 +158,8 @@ static void generate_offsets(enum vl_median_filter_shape shape, unsigned size, struct vertex2f **offsets, unsigned *num_offsets) { - int i = 0, half_size; + unsigned i = 0; + int half_size; struct vertex2f v; assert(offsets && num_offsets); diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c index 6fc915a1086..0e99d830df3 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c @@ -583,12 +583,12 @@ init_dct_coeff_table(struct dct_coeff *dst, const struct dct_coeff_compressed *s break; } - for(i=0; i<(1 << (17 - coeff.length)); ++i) + for(i = 0; i < (1u << (17 - coeff.length)); ++i) dst[src->bitcode << 1 | i] = coeff; if (has_sign) { coeff.level = -coeff.level; - for(; i<(1 << (18 - coeff.length)); ++i) + for(; i < (1u << (18 - coeff.length)); ++i) dst[src->bitcode << 1 | i] = coeff; } } diff --git a/src/gallium/auxiliary/vl/vl_vlc.h b/src/gallium/auxiliary/vl/vl_vlc.h index 7821b8be0a1..dd7b0918ae2 100644 --- a/src/gallium/auxiliary/vl/vl_vlc.h +++ b/src/gallium/auxiliary/vl/vl_vlc.h @@ -79,7 +79,7 @@ vl_vlc_init_table(struct vl_vlc_entry *dst, unsigned dst_size, const struct vl_v } for(; src_size > 0; --src_size, ++src) { - for(i=0; i<(1 << (bits - src->entry.length)); ++i) + for(i = 0; i < (1u << (bits - src->entry.length)); ++i) dst[src->bitcode >> (16 - bits) | i] = src->entry; } } @@ -293,7 +293,7 @@ vl_vlc_search_byte(struct vl_vlc *vlc, unsigned num_bits, uint8_t value) { /* make sure we are on a byte boundary */ assert((vl_vlc_valid_bits(vlc) % 8) == 0); - assert(num_bits == ~0 || (num_bits % 8) == 0); + assert(num_bits == ~0u || (num_bits % 8) == 0); /* deplete the bit buffer */ while (vl_vlc_valid_bits(vlc) > 0) { @@ -305,7 +305,7 @@ vl_vlc_search_byte(struct vl_vlc *vlc, unsigned num_bits, uint8_t value) vl_vlc_eatbits(vlc, 8); - if (num_bits != ~0) { + if (num_bits != ~0u) { num_bits -= 8; if (num_bits == 0) return FALSE; @@ -332,7 +332,7 @@ vl_vlc_search_byte(struct vl_vlc *vlc, unsigned num_bits, uint8_t value) } ++vlc->data; - if (num_bits != ~0) { + if (num_bits != ~0u) { num_bits -= 8; if (num_bits == 0) { vl_vlc_align_data_ptr(vlc); diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c index 5ff442087d4..ef05af463f3 100644 --- a/src/gallium/auxiliary/vl/vl_zscan.c +++ b/src/gallium/auxiliary/vl/vl_zscan.c @@ -99,15 +99,12 @@ static void * create_vert_shader(struct vl_zscan *zscan) { struct ureg_program *shader; - struct ureg_src scale; struct ureg_src vrect, vpos, block_num; - struct ureg_dst tmp; struct ureg_dst o_vpos; struct ureg_dst *o_vtex; - - signed i; + unsigned i; shader = ureg_create(PIPE_SHADER_VERTEX); if (!shader) |