diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-08-12 12:46:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-08-12 12:46:40 (GMT) |
commit | 507a21125783ea03d75e8c6460212cd22f8466ee (patch) | |
tree | a8279d3036e2bf3b625d33a104ac35996e26dfcf /c++ | |
parent | 4f61812180385bb969fee33eece609180cab4866 (diff) | |
download | hdf5-507a21125783ea03d75e8c6460212cd22f8466ee.zip hdf5-507a21125783ea03d75e8c6460212cd22f8466ee.tar.gz hdf5-507a21125783ea03d75e8c6460212cd22f8466ee.tar.bz2 |
[svn-r15462] Description:
Correct compiler warnings from Visual Studio.
Tested on:
Mac OS X/32 10.5.4 (amazon) w/FORTRAN & C++
(Too minor to require full h5committest)
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5Attribute.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5CommonFG.cpp | 4 | ||||
-rw-r--r-- | c++/test/dsets.cpp | 4 | ||||
-rw-r--r-- | c++/test/tfilter.cpp | 5 |
4 files changed, 7 insertions, 8 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; diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 652149e..603a0aa 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -423,7 +423,7 @@ test_compression(H5File& file) for (i = n = 0; i < 100; i++) { for (j = 0; j < 200; j++) { - points[i][j] = n++; + points[i][j] = (int)n++; } } char* tconv_buf = new char [1000]; @@ -487,7 +487,7 @@ test_compression(H5File& file) { for (j=0; j<size[1]; j++) { - points[i][j] = n++; + points[i][j] = (int)n++; } } diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index 1774cf2..db7e358 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -118,7 +118,7 @@ static void test_null_filter() // Output message about test being performed SUBTEST("'Null' filter"); try { - hsize_t null_size; // Size of dataset with null filter + //hsize_t null_size; // Size of dataset with null filter // Prepare dataset create property list DSetCreatPropList dsplist; @@ -168,7 +168,6 @@ void test_szip_filter(H5File& file1) { #ifdef H5_HAVE_FILTER_SZIP int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2]; - hsize_t szip_size; /* Size of dataset with szip filter */ unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK; unsigned szip_pixels_per_block=4; @@ -203,7 +202,7 @@ void test_szip_filter(H5File& file1) { for (j=0; j<size[1]; j++) { - points[i][j] = n++; + points[i][j] = (int)n++; } } |