Mesa (master): microsoft/clc: Fix MSVC unreferenced variable warnings
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 20 00:48:27 UTC 2021
Module: Mesa
Branch: master
Commit: d641adca6a632740e4158774aa6eebf20739ab22
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d641adca6a632740e4158774aa6eebf20739ab22
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Mon Apr 19 10:08:15 2021 -0700
microsoft/clc: Fix MSVC unreferenced variable warnings
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-By: Bill Kristiansen <billkris at microsoft.com>
Cc: mesa-stable at lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10331>
---
src/microsoft/clc/clc_compiler.c | 2 --
src/microsoft/clc/clc_helpers.cpp | 5 ++---
src/microsoft/clc/clc_nir.c | 2 --
src/microsoft/clc/compute_test.cpp | 1 -
4 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/microsoft/clc/clc_compiler.c b/src/microsoft/clc/clc_compiler.c
index 853cc63fb21..427415e6057 100644
--- a/src/microsoft/clc/clc_compiler.c
+++ b/src/microsoft/clc/clc_compiler.c
@@ -1018,8 +1018,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 e2f84b1da54..20bad26112b 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 5ca437a38ae..51f0f82fde2 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 335c52a97f4..2854268267c 100644
--- a/src/microsoft/clc/compute_test.cpp
+++ b/src/microsoft/clc/compute_test.cpp
@@ -794,7 +794,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;
More information about the mesa-commit
mailing list