[Mesa-dev] [PATCH 1/5] intel/compiler: Silence unused parameter warning

Ian Romanick idr at freedesktop.org
Mon Aug 13 23:34:17 UTC 2018

From: Ian Romanick <ian.d.romanick at intel.com>

A later commit would have added the warning below.  All of the other
brw_*_desc take and use a gen_device_info parameter.  All of the
functions are static and inline, so the compiler optimizes the parameter
away.  To maintain the pattern, just mark the parameter UNUSED.

In file included from src/intel/compiler/brw_fs_nir.cpp:28:0:
src/intel/compiler/brw_eu.h: In function ‘uint32_t brw_pixel_interp_desc(const gen_device_info*, unsigned int, bool, unsigned int, unsigned int)’:
src/intel/compiler/brw_eu.h:372:53: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
 brw_pixel_interp_desc(const struct gen_device_info *devinfo,

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
 src/intel/compiler/brw_eu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h
index 3824ab2ec6a..9fc9112a29d 100644
--- a/src/intel/compiler/brw_eu.h
+++ b/src/intel/compiler/brw_eu.h
@@ -369,7 +369,7 @@ brw_dp_surface_desc(const struct gen_device_info *devinfo,
  * interpolator function controls.
 static inline uint32_t
-brw_pixel_interp_desc(const struct gen_device_info *devinfo,
+brw_pixel_interp_desc(UNUSED const struct gen_device_info *devinfo,
                       unsigned msg_type,
                       bool noperspective,
                       unsigned simd_mode,

More information about the mesa-dev mailing list