[NFCI] Remove unused variables and enable -Wunused-variable (#1483)

Remove unused variables throughout the code base and enable the
`-Wunused-variable` warning flag globally to prevent new unused
variable issues being introduced in the future.

This is mostly a non-functional change, with one exception:

 - In `test_conformance/api/test_kernel_arg_info.cpp`, an error check
   of the clGetDeviceInfo return value was added.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2022-09-08 12:54:36 +01:00
committed by GitHub
parent fec9d9a238
commit 6554c49018
49 changed files with 29 additions and 112 deletions

View File

@@ -79,7 +79,6 @@ float qcom_s64_2_f32(int64_t data, bool sat, roundingMode rnd)
uint32_t mantissa;
if (mantShift >= 0){
uint64_t temp = (uint64_t)data >> mantShift;
uint64_t mask = (1 << mantShift) - 1;
if ((temp << mantShift) != data)
inExact = 1;
mantissa = (uint32_t)temp;
@@ -124,7 +123,6 @@ float qcom_s64_2_f32(int64_t data, bool sat, roundingMode rnd)
uint32_t mantissa;
if (mantShift >= 0){
uint64_t temp = (uint64_t)data >> mantShift;
uint64_t mask = (1 << mantShift) - 1;
if (temp << mantShift != data)
inExact = 1;
mantissa = (uint32_t)temp;
@@ -183,7 +181,6 @@ float qcom_u64_2_f32(uint64_t data, bool sat, roundingMode rnd)
uint32_t mantissa;
if (mantShift >= 0){
uint64_t temp = data >> mantShift;
uint64_t mask = (1 << mantShift) - 1;
if (temp << mantShift != data)
inExact = 1;
mantissa = (uint32_t)temp;
@@ -209,7 +206,6 @@ float qcom_u64_2_f32(uint64_t data, bool sat, roundingMode rnd)
uint32_t mantissa;
if (mantShift >= 0){
uint64_t temp = (uint64_t)data >> mantShift;
uint64_t mask = (1 << mantShift) - 1;
if (temp << mantShift != data)
inExact = 1;
mantissa = (uint32_t)temp;

View File

@@ -1666,8 +1666,6 @@ static cl_program MakeProgram( Type outType, Type inType, SaturationMode sat,
&programSource, testName, flags);
if (error)
{
char buffer[2048] = "";
vlog_error("Failed to build kernel/program.\n", error);
clReleaseProgram(program);
return NULL;