[Mesa-dev] [PATCH 04/22] i965: Silence unused parameter warnings in generated OA code
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Sat Feb 24 01:01:58 UTC 2018
Rb!
On 23/02/18 23:55, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Reduces my build from 6301 warnings to 2075 warnings by silencing 4226
> instances of things like
>
> src/mesa/drivers/dri/i965/i965 at sta/brw_oa_hsw.c: In function ‘hsw__render_basic__gpu_core_clocks__read’:
> src/mesa/drivers/dri/i965/i965 at sta/brw_oa_hsw.c:41:62: warning: unused parameter ‘brw’ [-Wunused-parameter]
> hsw__render_basic__gpu_core_clocks__read(struct brw_context *brw,
> ^~~
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mesa/drivers/dri/i965/brw_oa.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_oa.py b/src/mesa/drivers/dri/i965/brw_oa.py
> index 576ea66..7931c82 100644
> --- a/src/mesa/drivers/dri/i965/brw_oa.py
> +++ b/src/mesa/drivers/dri/i965/brw_oa.py
> @@ -260,7 +260,7 @@ def output_counter_read(set, counter, counter_vars):
>
> c("static " + ret_type)
> read_sym = "{0}__{1}__{2}__read".format(set.get('chipset').lower(), set.get('underscore_name'), counter.get('underscore_name'))
> - c(read_sym + "(struct brw_context *brw,\n")
> + c(read_sym + "(MAYBE_UNUSED struct brw_context *brw,\n")
> c_indent(len(read_sym) + 1)
> c("const struct brw_perf_query_info *query,\n")
> c("uint64_t *accumulator)\n")
More information about the mesa-dev
mailing list