Fix more 32-bit Wformat warnings (#2185)

This fixes occurrences where the previous wrong specifier appears to
work in a typical 64-bit build, but causes a Wformat warning in 32-bit
builds.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2024-12-17 18:55:37 +01:00
committed by GitHub
parent be1278d5b2
commit 7693ffe0a5
6 changed files with 46 additions and 19 deletions

View File

@@ -16,6 +16,7 @@
#include "testBase.h"
#include <limits.h>
#include <ctype.h>
#include <cinttypes>
#ifndef _WIN32
#include <unistd.h>
#endif
@@ -216,7 +217,9 @@ int test_compiler_defines_for_extensions(cl_device_id device, cl_context context
char *extension = (char *)malloc((extension_length + 1) * sizeof(char));
if (extension == NULL)
{
log_error( "Error: unable to allocate memory to hold extension name: %ld chars\n", extension_length );
log_error("Error: unable to allocate memory to hold extension "
"name: %" PRIdPTR " chars\n",
extension_length);
return -1;
}
extensions_supported[num_of_supported_extensions] = extension;