diff options
author | Ian Romanick <[email protected]> | 2017-06-14 18:59:09 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2017-06-28 14:50:14 -0700 |
commit | 36bd4a5f21f9e7060def6cf5501040b0509a2a00 (patch) | |
tree | d68b111da6cfb5067ef3af1037e08436a6188368 /src | |
parent | a56f0203c34b587da423133647d242f4b3a567ad (diff) |
genxml: Silence about a billion unused parameter warnings
v2: Use textwrap.dedent to make the source line a lot shorter.
Shortening (?) the line was requested by Jason.
v3: Simplify the texwrap.dedent usage. Suggested by Dylan.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/genxml/gen_pack_header.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py index fefbc9aeccb..9021f008a82 100644 --- a/src/intel/genxml/gen_pack_header.py +++ b/src/intel/genxml/gen_pack_header.py @@ -8,6 +8,7 @@ import xml.parsers.expat import re import sys import copy +import textwrap license = """/* * Copyright (C) 2016 Intel Corporation @@ -578,8 +579,12 @@ class Parser(object): def emit_pack_function(self, name, group): name = self.gen_prefix(name) - print("static inline void\n%s_pack(__gen_user_data *data, void * restrict dst,\n%sconst struct %s * restrict values)\n{" % - (name, ' ' * (len(name) + 6), name)) + print(textwrap.dedent("""\ + static inline void + %s_pack(__attribute__((unused)) __gen_user_data *data, + %s__attribute__((unused)) void * restrict dst, + %s__attribute__((unused)) const struct %s * restrict values) + {""") % (name, ' ' * len(name), ' ' * len(name), name)) (dwords, length) = group.collect_dwords_and_length() if length: |