summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2021-04-19 10:08:15 -0700
committerDylan Baker <dylan.c.baker@intel.com>2021-04-21 09:53:37 -0700
commitde43c16892d9f73a1bdd2503bd707c9a941bfa06 (patch)
treec1ae5bc2ca034601631ae63205120eec48880220
parent0c939b5bb343fc2dafbf434a7386000fc25c6ab8 (diff)
downloadmesa-de43c16892d9f73a1bdd2503bd707c9a941bfa06.tar.gz
microsoft/clc: Fix MSVC unreferenced variable warnings
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-By: Bill Kristiansen <billkris@microsoft.com> Cc: mesa-stable@lists.freedesktop.org Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331> (cherry picked from commit d641adca6a632740e4158774aa6eebf20739ab22)
-rw-r--r--.pick_status.json2
-rw-r--r--src/microsoft/clc/clc_compiler.c2
-rw-r--r--src/microsoft/clc/clc_helpers.cpp5
-rw-r--r--src/microsoft/clc/clc_nir.c2
-rw-r--r--src/microsoft/clc/compute_test.cpp1
5 files changed, 3 insertions, 9 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 0c93c5ee8dc..a232045f8c3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -427,7 +427,7 @@
"description": "microsoft/clc: Fix MSVC unreferenced variable warnings",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/microsoft/clc/clc_compiler.c b/src/microsoft/clc/clc_compiler.c
index 85eab42729d..f794fba168b 100644
--- a/src/microsoft/clc/clc_compiler.c
+++ b/src/microsoft/clc/clc_compiler.c
@@ -1014,8 +1014,6 @@ clc_to_dxil(struct clc_context *ctx,
{
struct clc_dxil_object *dxil;
struct nir_shader *nir;
- char *err_log;
- int ret;
dxil = calloc(1, sizeof(*dxil));
if (!dxil) {
diff --git a/src/microsoft/clc/clc_helpers.cpp b/src/microsoft/clc/clc_helpers.cpp
index 38642b89819..9c5dee98f48 100644
--- a/src/microsoft/clc/clc_helpers.cpp
+++ b/src/microsoft/clc/clc_helpers.cpp
@@ -196,9 +196,8 @@ public:
void parseTypePointer(const spv_parsed_instruction_t *ins)
{
enum clc_kernel_arg_address_qualifier addrQualifier;
- uint32_t typeId, targetTypeId, storageClass;
+ uint32_t typeId, storageClass;
const spv_parsed_operand_t *op;
- const char *typeName;
assert(ins->num_operands == 3);
@@ -327,7 +326,7 @@ public:
void parseOpDecorate(const spv_parsed_instruction_t *ins)
{
const spv_parsed_operand_t *op;
- uint32_t id, decoration;
+ uint32_t id;
assert(ins->num_operands >= 2);
diff --git a/src/microsoft/clc/clc_nir.c b/src/microsoft/clc/clc_nir.c
index 206365ab896..c239958c66a 100644
--- a/src/microsoft/clc/clc_nir.c
+++ b/src/microsoft/clc/clc_nir.c
@@ -168,8 +168,6 @@ static bool
lower_load_kernel_input(nir_builder *b, nir_intrinsic_instr *intr,
nir_variable *var)
{
- nir_intrinsic_instr *load;
-
b->cursor = nir_before_instr(&intr->instr);
unsigned bit_size = nir_dest_bit_size(intr->dest);
diff --git a/src/microsoft/clc/compute_test.cpp b/src/microsoft/clc/compute_test.cpp
index 6611a96174a..6dd4261df9e 100644
--- a/src/microsoft/clc/compute_test.cpp
+++ b/src/microsoft/clc/compute_test.cpp
@@ -805,7 +805,6 @@ ComputeTest::compile(const std::vector<const char *> &sources,
struct clc_compile_args args = { 0 };
args.args = compile_args.data();
args.num_args = (unsigned)compile_args.size();
- struct clc_dxil_object *dxil;
ComputeTest::Shader shader;
std::vector<Shader> shaders;