summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5Attribute.cpp2
-rw-r--r--c++/src/H5CommonFG.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 64993a2..404aec9 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -153,7 +153,7 @@ void Attribute::read( const DataType& mem_type, H5std_string& strg ) const
{
throw AttributeIException("Attribute::read", "Unable to get attribute size before reading");
}
- char* strg_C = new char [attr_size+1];
+ char* strg_C = new char [(size_t)attr_size+1];
if (strg_C == NULL)
{
throw AttributeIException("Attribute::read", "Unable to allocate buffer to read the attribute");
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 364f639..71658df 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -546,11 +546,11 @@ H5std_string CommonFG::getComment (const H5std_string& name) const
// temporary C-string for the object's comment
char* comment_C = new char[bufsize+1];
- herr_t ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT);
+ ssize_t ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT);
// if the actual length of the comment is longer than the anticipated
// value, then call H5Oget_comment_by_name again with the correct value
- if (ret_value > bufsize)
+ if ((size_t)ret_value > bufsize)
{
bufsize = ret_value;
delete []comment_C;