[Mesa-dev] [PATCH 2/3] nvc0: Fix unused var warnings in release build

Rhys Kidd rhyskidd at gmail.com
Sat Dec 2 18:22:44 UTC 2017


Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
 src/gallium/drivers/nouveau/nvc0/nvc0_video.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
index b5e7bba5f9..5c1cf899ca 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c
@@ -32,7 +32,7 @@ nvc0_decoder_begin_frame(struct pipe_video_codec *decoder,
 {
    struct nouveau_vp3_decoder *dec = (struct nouveau_vp3_decoder *)decoder;
    uint32_t comm_seq = ++dec->fence_seq;
-   unsigned ret = 0;
+   MAYBE_UNUSED unsigned ret = 0; /* used in debug checks */
 
    assert(dec);
    assert(target);
@@ -53,7 +53,7 @@ nvc0_decoder_decode_bitstream(struct pipe_video_codec *decoder,
 {
    struct nouveau_vp3_decoder *dec = (struct nouveau_vp3_decoder *)decoder;
    uint32_t comm_seq = dec->fence_seq;
-   unsigned ret = 0;
+   MAYBE_UNUSED unsigned ret = 0; /* used in debug checks */
 
    assert(decoder);
 
@@ -72,7 +72,8 @@ nvc0_decoder_end_frame(struct pipe_video_codec *decoder,
    uint32_t comm_seq = dec->fence_seq;
    union pipe_desc desc;
 
-   unsigned vp_caps, is_ref, ret;
+   unsigned vp_caps, is_ref;
+   MAYBE_UNUSED unsigned ret; /* used in debug checks */
    struct nouveau_vp3_video_buffer *refs[16] = {};
 
    desc.base = picture;
-- 
2.14.1



More information about the mesa-dev mailing list