[Mesa-dev] [PATCH] gallium/util: Silence GCC unused-but-set-variable warning.

Vinson Lee vlee at freedesktop.org
Wed Jul 29 20:12:41 PDT 2015


u_surface.c: In function 'util_resource_copy_region':
u_surface.c:257:21: warning: variable 'src_format' set but not used [-Wunused-but-set-variable]
    enum pipe_format src_format, dst_format;
                     ^

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/gallium/auxiliary/util/u_surface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index 654b5bb..e362471 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -270,6 +270,7 @@ util_resource_copy_region(struct pipe_context *pipe,
    assert(util_format_get_blocksize(dst_format) == util_format_get_blocksize(src_format));
    assert(util_format_get_blockwidth(dst_format) == util_format_get_blockwidth(src_format));
    assert(util_format_get_blockheight(dst_format) == util_format_get_blockheight(src_format));
+   (void) src_format;
 
    src_map = pipe->transfer_map(pipe,
                                 src,
-- 
2.1.4



More information about the mesa-dev mailing list