From: Michael Tremer Date: Sat, 26 Oct 2024 13:23:15 +0000 (+0000) Subject: tests: Fix integer sizes in string formatting X-Git-Tag: 0.9.30~825 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7b99549bfba206976bc3714ef3c4de9e115855e;p=pakfire.git tests: Fix integer sizes in string formatting Signed-off-by: Michael Tremer --- 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)