[Mesa-dev] [PATCH 1/2] gallium: Silence unused variable warnings
Gurkirpal Singh
gurkirpal204 at gmail.com
Tue Jun 28 20:01:02 UTC 2016
Signed-off-by: Gurkirpal Singh <gurkirpal204 at gmail.com>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 2 ++
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 1 +
src/gallium/drivers/nouveau/nv50/nv98_video.c | 1 +
src/gallium/drivers/nouveau/nvc0/nvc0_video.c | 3 +++
src/gallium/drivers/softpipe/sp_state_shader.c | 1 +
src/gallium/state_trackers/xvmc/surface.c | 2 ++
src/gallium/state_trackers/xvmc/tests/xvmc_bench.c | 4 ++++
7 files changed, 14 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
index 0fe399b..d5479a7 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
@@ -637,6 +637,7 @@ CodeEmitterNV50::emitLOAD(const Instruction *i)
case FILE_MEMORY_SHARED:
if (targ->getChipset() >= 0x84) {
assert(offset <= (int32_t)(0x3fff * typeSizeof(i->sType)));
+ (void) offset;
code[0] = 0x10000001;
code[1] = 0x40000000;
@@ -646,6 +647,7 @@ CodeEmitterNV50::emitLOAD(const Instruction *i)
emitLoadStoreSizeCS(i->sType);
} else {
assert(offset <= (int32_t)(0x1f * typeSizeof(i->sType)));
+ (void) offset;
code[0] = 0x10000001;
code[1] = 0x00200000 | (i->lanes << 14);
emitLoadStoreSizeCS(i->sType);
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 3213188..e92cfea 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -2965,6 +2965,7 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb)
ImmediateValue val;
bool ret = def->src(0).getImmediate(val);
assert(ret);
+ (void) ret;
if (i->getSrc(1)->reg.data.id & 1)
val.reg.data.u32 >>= 16;
val.reg.data.u32 &= 0xffff;
diff --git a/src/gallium/drivers/nouveau/nv50/nv98_video.c b/src/gallium/drivers/nouveau/nv50/nv98_video.c
index 177a7e0..ce86399 100644
--- a/src/gallium/drivers/nouveau/nv50/nv98_video.c
+++ b/src/gallium/drivers/nouveau/nv50/nv98_video.c
@@ -53,6 +53,7 @@ nv98_decoder_decode_bitstream(struct pipe_video_codec *decoder,
/* did we decode bitstream correctly? */
assert(ret == 2);
+ (void) ret;
nv98_decoder_vp(dec, desc, target, comm_seq, vp_caps, is_ref, refs);
nv98_decoder_ppp(dec, desc, target, comm_seq);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
index a9fd1d2..d83f2a9 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
@@ -41,6 +41,7 @@ nvc0_decoder_begin_frame(struct pipe_video_codec *decoder,
ret = nvc0_decoder_bsp_begin(dec, comm_seq);
assert(ret == 2);
+ (void) ret;
}
static void
@@ -60,6 +61,7 @@ nvc0_decoder_decode_bitstream(struct pipe_video_codec *decoder,
ret = nvc0_decoder_bsp_next(dec, comm_seq, num_buffers, data, num_bytes);
assert(ret == 2);
+ (void) ret;
}
static void
@@ -81,6 +83,7 @@ nvc0_decoder_end_frame(struct pipe_video_codec *decoder,
/* did we decode bitstream correctly? */
assert(ret == 2);
+ (void) ret;
nvc0_decoder_vp(dec, desc, target, comm_seq, vp_caps, is_ref, refs);
nvc0_decoder_ppp(dec, desc, target, comm_seq);
diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c
index a745662..d3abd9d 100644
--- a/src/gallium/drivers/softpipe/sp_state_shader.c
+++ b/src/gallium/drivers/softpipe/sp_state_shader.c
@@ -424,6 +424,7 @@ softpipe_delete_compute_state(struct pipe_context *pipe,
struct sp_compute_shader *state = (struct sp_compute_shader *)cs;
assert(softpipe->cs != state);
+ (void) softpipe;
tgsi_free_tokens(state->tokens);
FREE(state);
}
diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c
index 199712b..8e9e079 100644
--- a/src/gallium/state_trackers/xvmc/surface.c
+++ b/src/gallium/state_trackers/xvmc/surface.c
@@ -270,6 +270,8 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext *context, unsigned int pictur
assert(target_surface_priv->context == context);
assert(!past_surface || past_surface_priv->context == context);
assert(!future_surface || future_surface_priv->context == context);
+ (void) past_surface_priv;
+ (void) future_surface_priv;
// call end frame on all referenced frames
if (past_surface)
diff --git a/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c b/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
index 4dc95ba..ec7ecc8 100644
--- a/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
+++ b/src/gallium/state_trackers/xvmc/tests/xvmc_bench.c
@@ -303,5 +303,9 @@ int main(int argc, char **argv)
XDestroyWindow(display, window);
XCloseDisplay(display);
+ (void) block_array;
+ (void) context;
+ (void) surface;
+
return 0;
}
--
2.7.4
More information about the mesa-dev
mailing list