libnbd/0003-tests-Fix-overflow-in-calculation-on-32-bit-platform.patch
2019-08-21 11:34:19 +01:00

35 lines
1.0 KiB
Diff

From 4040499468abb7b04dfed4250ed050916ce4019a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 21 Aug 2019 11:25:20 +0100
Subject: [PATCH 3/3] tests: Fix overflow in calculation on 32 bit platforms.
---
tests/aio-parallel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/aio-parallel.c b/tests/aio-parallel.c
index ad01da6..d5477c9 100644
--- a/tests/aio-parallel.c
+++ b/tests/aio-parallel.c
@@ -81,7 +81,7 @@ main (int argc, char *argv[])
{
pthread_t threads[NR_MULTI_CONN];
struct thread_status status[NR_MULTI_CONN];
- size_t i, j;
+ uint64_t i, j;
time_t t;
int err;
unsigned requests, most_in_flight, errors;
@@ -146,7 +146,7 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
if (status[i].status != 0) {
- fprintf (stderr, "thread %zu failed with status %d\n",
+ fprintf (stderr, "thread %" PRIu64 " failed with status %d\n",
i, status[i].status);
errors++;
}
--
2.22.0