|
|
fdb77dc |
From d4ae490aaa5f8f3a8a7c4986cfc1e55621789354 Mon Sep 17 00:00:00 2001
|
|
|
fdb77dc |
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
|
|
|
fdb77dc |
Date: Thu, 29 Apr 2021 09:00:16 +0100
|
|
|
fdb77dc |
Subject: [PATCH] fix(32bit arches): use explicit casts
|
|
|
fdb77dc |
|
|
|
fdb77dc |
Explicitly casts long long unsigned int to size_t
|
|
|
fdb77dc |
|
|
|
fdb77dc |
Fixes https://github.com/BlueBrain/HighFive/issues/443
|
|
|
fdb77dc |
---
|
|
|
fdb77dc |
include/highfive/bits/H5Attribute_misc.hpp | 2 +-
|
|
|
fdb77dc |
include/highfive/bits/H5File_misc.hpp | 2 +-
|
|
|
fdb77dc |
include/highfive/bits/H5Node_traits_misc.hpp | 2 +-
|
|
|
fdb77dc |
include/highfive/bits/H5Path_traits_misc.hpp | 2 +-
|
|
|
fdb77dc |
include/highfive/bits/H5Reference_misc.hpp | 2 +-
|
|
|
fdb77dc |
5 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
fdb77dc |
|
|
|
fdb77dc |
diff --git a/include/highfive/bits/H5Attribute_misc.hpp b/include/highfive/bits/H5Attribute_misc.hpp
|
|
|
fdb77dc |
index 63ae5f3..9e4ffe4 100644
|
|
|
fdb77dc |
--- a/include/highfive/bits/H5Attribute_misc.hpp
|
|
|
fdb77dc |
+++ b/include/highfive/bits/H5Attribute_misc.hpp
|
|
|
fdb77dc |
@@ -30,7 +30,7 @@ namespace HighFive {
|
|
|
fdb77dc |
|
|
|
fdb77dc |
inline std::string Attribute::getName() const {
|
|
|
fdb77dc |
return details::get_name([&](char *buffer, hsize_t length) {
|
|
|
fdb77dc |
- return H5Aget_name(_hid, length, buffer);
|
|
|
fdb77dc |
+ return H5Aget_name(_hid, static_cast<size_t>(length), buffer);
|
|
|
fdb77dc |
});
|
|
|
fdb77dc |
}
|
|
|
fdb77dc |
|
|
|
fdb77dc |
diff --git a/include/highfive/bits/H5File_misc.hpp b/include/highfive/bits/H5File_misc.hpp
|
|
|
fdb77dc |
index 304205a..ee8293c 100644
|
|
|
fdb77dc |
--- a/include/highfive/bits/H5File_misc.hpp
|
|
|
fdb77dc |
+++ b/include/highfive/bits/H5File_misc.hpp
|
|
|
fdb77dc |
@@ -78,7 +78,7 @@ inline File::File(const std::string& filename, unsigned openFlags,
|
|
|
fdb77dc |
inline const std::string& File::getName() const noexcept {
|
|
|
fdb77dc |
if (_filename.empty()) {
|
|
|
fdb77dc |
_filename = details::get_name([this](char* buffer, hsize_t length) {
|
|
|
fdb77dc |
- return H5Fget_name(getId(), buffer, length);
|
|
|
fdb77dc |
+ return H5Fget_name(getId(), buffer, static_cast<size_t>(length));
|
|
|
fdb77dc |
});
|
|
|
fdb77dc |
}
|
|
|
fdb77dc |
return _filename;
|
|
|
fdb77dc |
diff --git a/include/highfive/bits/H5Node_traits_misc.hpp b/include/highfive/bits/H5Node_traits_misc.hpp
|
|
|
fdb77dc |
index a34067c..859cefd 100644
|
|
|
fdb77dc |
--- a/include/highfive/bits/H5Node_traits_misc.hpp
|
|
|
fdb77dc |
+++ b/include/highfive/bits/H5Node_traits_misc.hpp
|
|
|
fdb77dc |
@@ -149,7 +149,7 @@ inline std::string NodeTraits<Derivate>::getObjectName(size_t index) const {
|
|
|
fdb77dc |
return details::get_name([&](char* buffer, hsize_t length) {
|
|
|
fdb77dc |
return H5Lget_name_by_idx(
|
|
|
fdb77dc |
static_cast<const Derivate*>(this)->getId(), ".", H5_INDEX_NAME, H5_ITER_INC,
|
|
|
fdb77dc |
- index, buffer, length, H5P_DEFAULT);
|
|
|
fdb77dc |
+ index, buffer, static_cast<size_t>(length), H5P_DEFAULT);
|
|
|
fdb77dc |
});
|
|
|
fdb77dc |
}
|
|
|
fdb77dc |
|
|
|
fdb77dc |
diff --git a/include/highfive/bits/H5Path_traits_misc.hpp b/include/highfive/bits/H5Path_traits_misc.hpp
|
|
|
fdb77dc |
index 75617a1..b59f99a 100644
|
|
|
fdb77dc |
--- a/include/highfive/bits/H5Path_traits_misc.hpp
|
|
|
fdb77dc |
+++ b/include/highfive/bits/H5Path_traits_misc.hpp
|
|
|
fdb77dc |
@@ -36,7 +36,7 @@ inline PathTraits<Derivate>::PathTraits() {
|
|
|
fdb77dc |
template <typename Derivate>
|
|
|
fdb77dc |
inline std::string PathTraits<Derivate>::getPath() const {
|
|
|
fdb77dc |
return details::get_name([this](char* buffer, hsize_t length) {
|
|
|
fdb77dc |
- return H5Iget_name(static_cast<const Derivate*>(this)->getId(), buffer, length);
|
|
|
fdb77dc |
+ return H5Iget_name(static_cast<const Derivate*>(this)->getId(), buffer, static_cast<size_t>(length));
|
|
|
fdb77dc |
});
|
|
|
fdb77dc |
}
|
|
|
fdb77dc |
|
|
|
fdb77dc |
diff --git a/include/highfive/bits/H5Reference_misc.hpp b/include/highfive/bits/H5Reference_misc.hpp
|
|
|
fdb77dc |
index b4aea3e..7486bb8 100644
|
|
|
fdb77dc |
--- a/include/highfive/bits/H5Reference_misc.hpp
|
|
|
fdb77dc |
+++ b/include/highfive/bits/H5Reference_misc.hpp
|
|
|
fdb77dc |
@@ -20,7 +20,7 @@ namespace HighFive {
|
|
|
fdb77dc |
inline Reference::Reference(const Object& location, const Object& object)
|
|
|
fdb77dc |
: parent_id(location.getId()) {
|
|
|
fdb77dc |
obj_name = details::get_name([&](char *buffer, hsize_t length) {
|
|
|
fdb77dc |
- return H5Iget_name(object.getId(), buffer, length); });
|
|
|
fdb77dc |
+ return H5Iget_name(object.getId(), buffer, static_cast<size_t>(length)); });
|
|
|
fdb77dc |
}
|
|
|
fdb77dc |
|
|
|
fdb77dc |
inline void Reference::create_ref(hobj_ref_t* refptr) const {
|
|
|
fdb77dc |
--
|
|
|
fdb77dc |
2.31.1
|
|
|
fdb77dc |
|