[NFC] Fix unused variable warning in Release builds (#1494)

The condition inside the assert is dropped in Release builds, so
`num_printed` becomes unused.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2022-09-09 17:58:31 +01:00
committed by GitHub
parent 6554c49018
commit 89c8d87963

View File

@@ -1256,6 +1256,7 @@ static int l_capacity( cl_device_id device, cl_context context, cl_command_queue
char prog_src[MAX_STR];
int num_printed = snprintf(prog_src,sizeof(prog_src),prog_src_template,max_size, max_size);
assert( num_printed < MAX_STR ); // or increase MAX_STR
(void)num_printed;
StringTable ksrc;
ksrc.add( prog_src );