basic: fix Wformat warnings (#2343)

Fix all `-Wformat` warnings in the basic test suite, and re-enable the
warning.

---------

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2025-03-25 17:45:18 +01:00
committed by GitHub
parent 1cbb548e27
commit b6924adfb2
8 changed files with 112 additions and 43 deletions

View File

@@ -14,6 +14,7 @@
// limitations under the License.
//
#include <cinttypes>
#include <functional>
#include <string>
#include <vector>
@@ -182,13 +183,13 @@ static int test_intmath(cl_device_id device, cl_context context,
if (r != output[i])
{
log_error("\n\nverification failed at index %d\n", i);
log_error("-> inputs: %llu, %llu, %llu\n",
static_cast<cl_uint>(inputA[i]),
static_cast<cl_uint>(inputB[i]),
static_cast<cl_uint>(inputC[i]));
log_error("-> expected %llu, got %llu\n\n",
static_cast<cl_uint>(r),
static_cast<cl_uint>(output[i]));
log_error("-> inputs: %" PRIu64 "%" PRIu64 "%" PRIu64 "\n",
static_cast<cl_ulong>(inputA[i]),
static_cast<cl_ulong>(inputB[i]),
static_cast<cl_ulong>(inputC[i]));
log_error("-> expected %" PRIu64 "%" PRIu64 "\n\n",
static_cast<cl_ulong>(r),
static_cast<cl_ulong>(output[i]));
return TEST_FAIL;
}
}