From 16df8fce6a2f5d7758721f92b6bf6d272cf589c6 Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 6 Feb 2025 13:48:35 +0100 Subject: [PATCH] Fix some format warnings or errors around time_t --- src/XrdCl/XrdClPollerBuiltIn.cc | 8 +++---- src/XrdClHttp/XrdClHttpFileSystemPlugIn.cc | 25 +++++++++++----------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/XrdCl/XrdClPollerBuiltIn.cc b/src/XrdCl/XrdClPollerBuiltIn.cc index 804438da9c3..0665711e271 100644 --- a/src/XrdCl/XrdClPollerBuiltIn.cc +++ b/src/XrdCl/XrdClPollerBuiltIn.cc @@ -388,8 +388,8 @@ namespace XrdCl return true; helper->readTimeout = timeout; - log->Dump( PollerMsg, "%s Enable read notifications, timeout: %d", - socket->GetName().c_str(), timeout ); + log->Dump( PollerMsg, "%s Enable read notifications, timeout: %lld", + socket->GetName().c_str(), (long long)timeout ); if( poller ) { @@ -474,8 +474,8 @@ namespace XrdCl helper->writeTimeout = timeout; - log->Dump( PollerMsg, "%s Enable write notifications, timeout: %d", - socket->GetName().c_str(), timeout ); + log->Dump( PollerMsg, "%s Enable write notifications, timeout: %lld", + socket->GetName().c_str(), (long long)timeout ); if( poller ) { diff --git a/src/XrdClHttp/XrdClHttpFileSystemPlugIn.cc b/src/XrdClHttp/XrdClHttpFileSystemPlugIn.cc index a84748c7178..25c840aae10 100644 --- a/src/XrdClHttp/XrdClHttpFileSystemPlugIn.cc +++ b/src/XrdClHttp/XrdClHttpFileSystemPlugIn.cc @@ -77,8 +77,9 @@ XRootDStatus HttpFileSystemPlugIn::Mv(const std::string &source, + dest; logger_->Debug(kLogXrdClHttp, - "HttpFileSystemPlugIn::Mv - src = %s, dest = %s, timeout = %d", - full_source_path.c_str(), full_dest_path.c_str(), timeout); + "HttpFileSystemPlugIn::Mv - src = %s, dest = %s, timeout = %lld", + full_source_path.c_str(), full_dest_path.c_str(), + (long long)timeout); auto status = Posix::Rename(*davix_client_, full_source_path, full_dest_path, timeout); @@ -100,8 +101,8 @@ XRootDStatus HttpFileSystemPlugIn::Rm(const std::string &path, url.SetPath(path); logger_->Debug(kLogXrdClHttp, - "HttpFileSystemPlugIn::Rm - path = %s, timeout = %d", - url.GetObfuscatedURL().c_str(), timeout); + "HttpFileSystemPlugIn::Rm - path = %s, timeout = %lld", + url.GetObfuscatedURL().c_str(), (long long)timeout); auto status = Posix::Unlink(*davix_client_, url.GetURL(), timeout); @@ -125,8 +126,8 @@ XRootDStatus HttpFileSystemPlugIn::MkDir(const std::string &path, logger_->Debug( kLogXrdClHttp, - "HttpFileSystemPlugIn::MkDir - path = %s, flags = %d, timeout = %d", - url.GetObfuscatedURL().c_str(), flags, timeout); + "HttpFileSystemPlugIn::MkDir - path = %s, flags = %d, timeout = %lld", + url.GetObfuscatedURL().c_str(), flags, (long long)timeout); auto status = Posix::MkDir(*davix_client_, url.GetURL(), flags, mode, timeout); if (status.IsError()) { @@ -146,8 +147,8 @@ XRootDStatus HttpFileSystemPlugIn::RmDir(const std::string &path, url.SetPath(path); logger_->Debug(kLogXrdClHttp, - "HttpFileSystemPlugIn::RmDir - path = %s, timeout = %d", - url.GetObfuscatedURL().c_str(), timeout); + "HttpFileSystemPlugIn::RmDir - path = %s, timeout = %lld", + url.GetObfuscatedURL().c_str(), (long long)timeout); auto status = Posix::RmDir(*davix_client_, url.GetURL(), timeout); if (status.IsError()) { @@ -169,8 +170,8 @@ XRootDStatus HttpFileSystemPlugIn::DirList(const std::string &path, logger_->Debug( kLogXrdClHttp, - "HttpFileSystemPlugIn::DirList - path = %s, flags = %d, timeout = %d", - full_path.c_str(), flags, timeout); + "HttpFileSystemPlugIn::DirList - path = %s, flags = %d, timeout = %lld", + full_path.c_str(), flags, (long long)timeout); const bool details = flags & DirListFlags::Stat; const bool recursive = flags & DirListFlags::Recursive; @@ -200,8 +201,8 @@ XRootDStatus HttpFileSystemPlugIn::Stat(const std::string &path, std::to_string(url_.GetPort()) + "/" + path; logger_->Debug(kLogXrdClHttp, - "HttpFileSystemPlugIn::Stat - path = %s, timeout = %d", - full_path.c_str(), timeout); + "HttpFileSystemPlugIn::Stat - path = %s, timeout = %lld", + full_path.c_str(), (long long)timeout); auto stat_info = new StatInfo(); //XRootDStatus status;