summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5File.cpp7
-rw-r--r--c++/src/H5File.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index aca787a..a368544 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -492,10 +492,11 @@ hid_t H5File::getLocId() const
/// order to learn the true size of the underlying file.
// Programmer Raymond Lu - June 24, 2004
//--------------------------------------------------------------------------
-haddr_t H5File::getFileSize(void) const
+hsize_t H5File::getFileSize() const
{
- haddr_t file_size = H5Fget_filesize(id);
- if( file_size < 0 )
+ hsize_t file_size;
+ herr_t ret_value = H5Fget_filesize(id, &file_size);
+ if (ret_value < 0)
{
throw FileIException("H5File::getFileSize", "H5Fget_filesize failed");
}
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index a6f40dd..900681e 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -73,7 +73,7 @@ class H5_DLLCPP H5File : public IdComponent, public CommonFG {
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Retrieves the file size of an opened file.
- haddr_t getFileSize() const;
+ hsize_t getFileSize() const;
// Reopens this file.
void reopen();