summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Warren <Richard.Warren@hdfgroup.org>2019-10-07 12:56:05 (GMT)
committerRichard Warren <Richard.Warren@hdfgroup.org>2019-10-07 12:56:05 (GMT)
commita074eeda117072a82300c9b937f086e23def9243 (patch)
tree780e856e1486e72e3407f5081cf2d76ec4f3f00c
parentfa2882c0b3d27246760017ad3ebc9813cc17a066 (diff)
downloadhdf5-a074eeda117072a82300c9b937f086e23def9243.zip
hdf5-a074eeda117072a82300c9b937f086e23def9243.tar.gz
hdf5-a074eeda117072a82300c9b937f086e23def9243.tar.bz2
Made code review edit suggested by Jerome, plus various code updates to files that I touched to eliminate compile warnings (on my Linux box).
-rw-r--r--src/H5Smpio.c8
-rw-r--r--testpar/t_file.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 287bde1..906aea8 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -45,7 +45,7 @@
#define H5S_MPIO_INITIAL_ALLOC_COUNT 256
#define TWO_GIG_LIMIT 2147483648
#ifndef H5S_MAX_MPI_COUNT
-#define H5S_MAX_MPI_COUNT 1073741824
+#define H5S_MAX_MPI_COUNT (1 << 30)
#endif
@@ -1124,7 +1124,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down,
{
H5S_hyper_span_t *span; /* Hyperslab span to iterate with */
size_t alloc_count = 0; /* Number of span tree nodes allocated at this level */
- size_t outercount; /* Number of span tree nodes at this level */
+ size_t outercount = 0; /* Number of span tree nodes at this level */
MPI_Datatype *inner_type = NULL;
hbool_t inner_types_freed = FALSE; /* Whether the inner_type MPI datatypes have been freed */
int *blocklen = NULL;
@@ -1184,7 +1184,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down,
H5_CHECK_OVERFLOW(nelmts, hsize_t, int)
blocklen[outercount] = (int)nelmts;
- if(bigio_count < blocklen[outercount])
+ if(bigio_count < (hsize_t)blocklen[outercount])
large_block = TRUE; /* at least one block type is large, so set this flag to true */
span = span->next;
@@ -1201,7 +1201,7 @@ H5S__obtain_datatype(H5S_hyper_span_info_t *spans, const hsize_t *down,
MPI_Datatype temp_type = MPI_DATATYPE_NULL;
/* create the block type from elmt_type while checking the 32 bit int limit */
- if(blocklen[u] > bigio_count) {
+ if((hsize_t)(blocklen[u]) > bigio_count) {
if(H5S_mpio_create_large_type(blocklen[u], 0, *elmt_type, &temp_type) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "couldn't create a large element datatype in span_hyper selection")
} /* end if */
diff --git a/testpar/t_file.c b/testpar/t_file.c
index e5a4f8a..99ac189 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -432,7 +432,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
hsize_t dims[RANK], i;
hsize_t num_elements;
int k;
- char dset_name[10];
+ char dset_name[20];
H5F_t *f = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t config;
@@ -589,7 +589,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy,
hsize_t block[RANK];
int i, k, ndims;
hsize_t num_elements;
- char dset_name[10];
+ char dset_name[20];
H5F_t *f = NULL;
H5C_t *cache_ptr = NULL;
H5AC_cache_config_t config;
@@ -664,8 +664,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy,
ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
VRFY((ndims == 2), "H5Sget_simple_extent_dims succeeded");
- VRFY(dims[0] == ROW_FACTOR*mpi_size, "Wrong dataset dimensions");
- VRFY(dims[1] == COL_FACTOR*mpi_size, "Wrong dataset dimensions");
+ VRFY(dims[0] == (hsize_t)(ROW_FACTOR*mpi_size), "Wrong dataset dimensions");
+ VRFY(dims[1] == (hsize_t)(COL_FACTOR*mpi_size), "Wrong dataset dimensions");
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -678,7 +678,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy,
ret = H5Sclose(sid);
VRFY((ret == 0), "");
- for (i=0; i < num_elements; i++)
+ for (i=0; i < (int)num_elements; i++)
VRFY((data_array[i] == mpi_rank+1), "Dataset Verify failed");
}