xrootd/xrootd-32bit-format.patch
2021-02-25 18:00:47 +01:00

32 lines
1.3 KiB
Diff

From e5fedffb0d0e4d479e8a152ffb6c89eebab76c0c Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 25 Feb 2021 17:19:13 +0100
Subject: [PATCH] Fix format error on 32 bit architectures
error: format '%ld' expects argument of type 'long int', but argument
3 has type 'uint64_t' {aka 'long long unsigned int'}
---
src/XrdClHttp/Posix.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/XrdClHttp/src/XrdClHttp/Posix.cc b/src/XrdClHttp/src/XrdClHttp/Posix.cc
index cdd3317..4c47382 100644
--- a/src/XrdClHttp/src/XrdClHttp/Posix.cc
+++ b/src/XrdClHttp/src/XrdClHttp/Posix.cc
@@ -341,11 +341,11 @@ std::pair<int, XRootDStatus> _PRead(Davix::DavPosix& davix_client, DAVIX_FD* fd,
Davix::DavixError* err = nullptr;
int num_bytes_read;
if (no_pread) { // continue reading from the current offset position
- printf("Posix::Read(size=%d)\n", size);
+ printf("Posix::Read(size=%u)\n", size);
num_bytes_read = davix_client.read(fd, buffer, size, &err);
}
else {
- printf("Posix::PRead(size=%d, offset=%ld)\n", size, offset);
+ printf("Posix::PRead(size=%u, offset=%llu)\n", size, (unsigned long long)offset);
num_bytes_read = davix_client.pread(fd, buffer, size, offset, &err);
}
if (num_bytes_read < 0) {
--
2.29.2