From: Ian Romanick Date: Mon, 12 Feb 2018 19:26:39 +0000 (-0800) Subject: i965: Silence unused parameter warnings in generated OA code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab8f2e30b8ea3565c00a76b546b7ef3b78ab7ff6;p=mesa.git i965: Silence unused parameter warnings in generated OA code Reduces my build from 6301 warnings to 2075 warnings by silencing 4226 instances of things like src/mesa/drivers/dri/i965/i965@sta/brw_oa_hsw.c: In function ‘hsw__render_basic__gpu_core_clocks__read’: src/mesa/drivers/dri/i965/i965@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 Reviewed-by: Lionel Landwerlin Reviewed-by: Samuel Iglesias Gonsálvez --- diff --git a/src/mesa/drivers/dri/i965/brw_oa.py b/src/mesa/drivers/dri/i965/brw_oa.py index 576ea6687fc..7931c825f08 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")