diff options
author | Grazvydas Ignotas <[email protected]> | 2016-04-16 04:00:12 +0300 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-04-25 12:23:21 +0200 |
commit | cbb0d4ad75e6309932af7995ca80fa5ff5db7c70 (patch) | |
tree | 82a47174ffd75e683e8ab9fe75f5886c59180db5 /src/gallium/drivers | |
parent | bbeb9ab2f71409aad47485e7a1b8900f6839a481 (diff) |
gallium: fix warnings in release build
Mark variables MAYBE_UNUSED to avoid unused-but-set-variable warnings
in release build.
Signed-off-by: Grazvydas Ignotas <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/compute_memory_pool.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_sampler.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tile_cache.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index 534c5f48a64..d7fa9fd20bf 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -108,7 +108,7 @@ lp_setup_unmap_vertices(struct vbuf_render *vbr, ushort min_index, ushort max_index ) { - struct lp_setup_context *setup = lp_setup_context(vbr); + MAYBE_UNUSED struct lp_setup_context *setup = lp_setup_context(vbr); assert( setup->vertex_buffer_size >= (max_index+1) * setup->vertex_size ); /* do nothing */ } diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index 93e3ffe256f..bcda155c71a 100644 --- a/src/gallium/drivers/r600/compute_memory_pool.c +++ b/src/gallium/drivers/r600/compute_memory_pool.c @@ -489,7 +489,7 @@ void compute_memory_move_item(struct compute_memory_pool *pool, struct r600_context *rctx = (struct r600_context *)pipe; struct pipe_box box; - struct compute_memory_item *prev; + MAYBE_UNUSED struct compute_memory_item *prev; COMPUTE_DBG(pool->screen, "* compute_memory_move_item()\n" " + Moving item %"PRIi64" from %"PRIi64" (%"PRIi64" bytes) to %"PRIu64" (%"PRIu64" bytes)\n", diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index 23ec4ef3cb6..f917147754d 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -199,7 +199,7 @@ prepare_shader_sampling( if (!sp_tex->dt) { /* regular texture - setup array of mipmap level offsets */ - struct pipe_resource *res = view->texture; + MAYBE_UNUSED struct pipe_resource *res = view->texture; int j; if (view->target != PIPE_BUFFER) { diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index c6233261938..0ebe082e8eb 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -92,7 +92,8 @@ sp_create_tile_cache( struct pipe_context *pipe ) { struct softpipe_tile_cache *tc; uint pos; - int maxLevels, maxTexSize; + MAYBE_UNUSED int maxTexSize; + int maxLevels; /* sanity checking: max sure MAX_WIDTH/HEIGHT >= largest texture image */ maxLevels = pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index 7ed4f4988dd..18c5c4345a7 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -1893,6 +1893,6 @@ error1: void trace_context_check(const struct pipe_context *pipe) { - struct trace_context *tr_ctx = (struct trace_context *) pipe; + MAYBE_UNUSED struct trace_context *tr_ctx = (struct trace_context *) pipe; assert(tr_ctx->base.destroy == trace_context_destroy); } |