From c7b99549bfba206976bc3714ef3c4de9e115855e Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 26 Oct 2024 13:23:15 +0000 Subject: [PATCH] tests: Fix integer sizes in string formatting Signed-off-by: Michael Tremer --- tests/libpakfire/jail.c | 2 +- tests/testsuite.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libpakfire/jail.c b/tests/libpakfire/jail.c index 594124e2f..10201b888 100644 --- a/tests/libpakfire/jail.c +++ b/tests/libpakfire/jail.c @@ -359,7 +359,7 @@ static ssize_t callback_stdin(struct pakfire_ctx* ctx, void* data, char* buffer, // Send another line bytes_written = snprintf(buffer, length, "LINE %d\n", *lines); if (bytes_written < 0) { - LOG_ERROR("Could not write line (%u) to stdin: %m\n", *lines); + LOG_ERROR("Could not write line (%d) to stdin: %m\n", *lines); return 1; } diff --git a/tests/testsuite.h b/tests/testsuite.h index b964ecfe7..746190cc3 100644 --- a/tests/testsuite.h +++ b/tests/testsuite.h @@ -190,7 +190,7 @@ ERROR: do { \ if (value1 != value2) { \ LOG_ERROR("Failed assertion: " #value1 " (%lld) != " #value2 " (%lld) %s:%d %s\n", \ - value1, value2, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + (long long int)value1, (long long int)value2, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ goto FAIL; \ } \ } while (0) -- 2.39.5