Fix some Wunused-but-set warnings (#1666)

To the best of my understanding, these occurrences of the
`-Wunused-but-set` warnings do not reveal any underlying issues, so we
can safely remove these variables.  There are more occurrences of this
warning in other places (not touched by this commit) that require
further analysis.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2023-03-30 09:34:00 +01:00
committed by GitHub
parent 8e74722a0a
commit a70fa56003
12 changed files with 3 additions and 42 deletions

View File

@@ -1185,7 +1185,7 @@ int test_min_max_image_buffer_size(cl_device_id deviceID, cl_context context,
int test_min_max_parameter_size(cl_device_id deviceID, cl_context context,
cl_command_queue queue, int num_elements)
{
int error, retVal, i;
int error, i;
size_t maxSize;
char *programSrc;
char *ptr;
@@ -1320,8 +1320,6 @@ int test_min_max_parameter_size(cl_device_id deviceID, cl_context context,
}
/* Try to set a large argument to the kernel */
retVal = 0;
mem = clCreateBuffer(context, CL_MEM_READ_WRITE, sizeof(cl_long), NULL,
&error);
test_error(error, "clCreateBuffer failed");