aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahooinc.com>2023-08-21 18:38:04 +0200
committerGitHub <noreply@github.com>2023-08-21 18:38:04 +0200
commit66dad5bb8734c8559a0e9b3c7260494245eba0b4 (patch)
tree617c7d97675d797b79106dcce92afb875d2c2ba2
parentab94c4090ddcf370a48366804d257436311baf62 (diff)
parent92e68c5777363c492b42a4de74ea8d2549b9c154 (diff)
Merge pull request #28096 from vespa-engine/toregge/fix-format-strings
Fix format strings.
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index d3553ad003f..c4b5d9c2145 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -668,7 +668,7 @@ vespalib::string
lsSingleFile(const vespalib::string & fileName)
{
fs::path path(fileName);
- return make_string("%s %20" PRIu64 " %12" PRId64, fileName.c_str(), vespalib::count_ns(fs::last_write_time(path).time_since_epoch()), fs::file_size(path));
+ return make_string("%s %20" PRIu64 " %12" PRIdMAX, fileName.c_str(), vespalib::count_ns(fs::last_write_time(path).time_since_epoch()), fs::file_size(path));
}
}
diff --git a/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp b/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp
index f711d3d8685..3d0b9debeda 100644
--- a/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp
+++ b/vespalib/src/vespa/vespalib/util/mmap_file_allocator.cpp
@@ -57,7 +57,7 @@ MmapFileAllocator::alloc(size_t sz) const
uint64_t offset = alloc_area(sz);
void *buf = mmap(nullptr, sz, PROT_READ | PROT_WRITE, MAP_SHARED, _file.getFileDescriptor(), offset);
if (buf == MAP_FAILED) {
- throw IoException(fmt("Failed mmap(nullptr, %zu, PROT_READ | PROT_WRITE, MAP_SHARED, %s(fd=%d), %lu). Reason given by OS = '%s'",
+ throw IoException(fmt("Failed mmap(nullptr, %zu, PROT_READ | PROT_WRITE, MAP_SHARED, %s(fd=%d), %" PRIu64 "). Reason given by OS = '%s'",
sz, _file.getFilename().c_str(), _file.getFileDescriptor(), offset, getLastErrorString().c_str()),
IoException::getErrorType(errno), VESPA_STRLOC);
}