[Mesa-dev] [PATCH 08/22] isl: Silence unused parameter warnings in __gen_combine_address implementations
Ian Romanick
idr at freedesktop.org
Fri Feb 23 23:55:53 UTC 2018
From: Ian Romanick <ian.d.romanick at intel.com>
Reduces my build from 1808 warnings to 1772 warnings by silencing 36
instances of things like
../../SOURCE/master/src/intel/isl/isl_emit_depth_stencil.c: In function ‘__gen_combine_address’:
../../SOURCE/master/src/intel/isl/isl_emit_depth_stencil.c:30:29: warning: unused parameter ‘data’ [-Wunused-parameter]
__gen_combine_address(void *data, void *loc, uint64_t addr, uint32_t delta)
^~~~
../../SOURCE/master/src/intel/isl/isl_emit_depth_stencil.c:30:41: warning: unused parameter ‘loc’ [-Wunused-parameter]
__gen_combine_address(void *data, void *loc, uint64_t addr, uint32_t delta)
^~~
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/intel/isl/isl_emit_depth_stencil.c | 4 +++-
src/intel/isl/isl_surface_state.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/intel/isl/isl_emit_depth_stencil.c b/src/intel/isl/isl_emit_depth_stencil.c
index 90ce889..51b3f00 100644
--- a/src/intel/isl/isl_emit_depth_stencil.c
+++ b/src/intel/isl/isl_emit_depth_stencil.c
@@ -27,7 +27,9 @@
#define __gen_user_data void
static uint64_t
-__gen_combine_address(void *data, void *loc, uint64_t addr, uint32_t delta)
+__gen_combine_address(__attribute__((unused)) void *data,
+ __attribute__((unused)) void *loc, uint64_t addr,
+ uint32_t delta)
{
return addr + delta;
}
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index bfb27fa..b93f428 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -27,7 +27,9 @@
#define __gen_user_data void
static uint64_t
-__gen_combine_address(void *data, void *loc, uint64_t addr, uint32_t delta)
+__gen_combine_address(__attribute__((unused)) void *data,
+ __attribute__((unused)) void *loc, uint64_t addr,
+ uint32_t delta)
{
return addr + delta;
}
--
2.9.5
More information about the mesa-dev
mailing list