summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-07-22 22:43:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-07-22 22:43:18 (GMT)
commit4af66b09e03af4e9b0b6a1293dfe746f48106aba (patch)
tree0cb162e0921a0a774a433f9d3cd9f08c44bbe57d /tools/misc
parent9b597a48552f5201b37793a4c6fece4fd9f1c346 (diff)
downloadhdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.zip
hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.gz
hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.bz2
[svn-r30219] Description:
More warning cleaups: down to 770 warnings (from ~940) in 134 files (from 148), with 28 unique kinds of warnings (from 31). Tested on: MacOSX/64 10.11.5 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/h5mkgrp.c4
-rw-r--r--tools/misc/vds/UC_1.h29
-rw-r--r--tools/misc/vds/UC_1_one_dim_gen.c36
-rw-r--r--tools/misc/vds/UC_2.h41
-rw-r--r--tools/misc/vds/UC_2_two_dims_gen.c44
-rw-r--r--tools/misc/vds/UC_3.h4
-rw-r--r--tools/misc/vds/UC_4_printf_gen.c4
-rw-r--r--tools/misc/vds/UC_5_stride_gen.c6
8 files changed, 82 insertions, 86 deletions
diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c
index 1c1bba1..ad2d306 100644
--- a/tools/misc/h5mkgrp.c
+++ b/tools/misc/h5mkgrp.c
@@ -63,7 +63,7 @@ param_t params; /* Command line parameter settings */
static void
leave(int ret)
{
- int curr_group;
+ size_t curr_group;
if (params.fname)
HDfree (params.fname);
@@ -180,7 +180,7 @@ parse_command_line(int argc, const char *argv[], param_t *parms)
} /* end if */
/* Allocate space for the group name pointers */
- parms->ngroups = (argc - opt_ind);
+ parms->ngroups = (size_t)(argc - opt_ind);
parms->groups = (char **)HDmalloc(parms->ngroups * sizeof(char *));
/* Retrieve the group names */
diff --git a/tools/misc/vds/UC_1.h b/tools/misc/vds/UC_1.h
index 24299d4..2150cfa 100644
--- a/tools/misc/vds/UC_1.h
+++ b/tools/misc/vds/UC_1.h
@@ -93,7 +93,6 @@ static hsize_t UC_1_DIMS[UC_1_N_SOURCES][RANK] = {
{0, UC_1_SM_HEIGHT, UC_1_WIDTH},
{0, UC_1_LG_HEIGHT, UC_1_WIDTH}
};
-static hsize_t UC_1_VDS_DIMS[RANK] = {0, UC_1_FULL_HEIGHT, UC_1_WIDTH};
/* Maximum size of datasets, both source and VDS */
static hsize_t UC_1_MAX_DIMS[UC_1_N_SOURCES][RANK] = {
@@ -104,18 +103,6 @@ static hsize_t UC_1_MAX_DIMS[UC_1_N_SOURCES][RANK] = {
{UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH},
{UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH}
};
-static hsize_t UC_1_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_1_FULL_HEIGHT, UC_1_WIDTH};
-
-/* Planes */
-static hsize_t UC_1_PLANES[UC_1_N_SOURCES][RANK] = {
- {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
- {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
- {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
- {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
- {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
- {1, UC_1_LG_HEIGHT, UC_1_WIDTH}
-};
-static hsize_t UC_1_VDS_PLANE[RANK] = {1, UC_1_FULL_HEIGHT, UC_1_WIDTH};
/* File names for source datasets */
static char UC_1_FILE_NAMES[UC_1_N_SOURCES][NAME_LEN] = {
@@ -127,24 +114,8 @@ static char UC_1_FILE_NAMES[UC_1_N_SOURCES][NAME_LEN] = {
{"1_f.h5"}
};
-/* VDS file name */
-static char UC_1_VDS_FILE_NAME[NAME_LEN] = "1_vds.h5";
-
/* Dataset names */
-static char UC_1_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
static char UC_1_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
-static char UC_1_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
-
-/* Fill values */
-static int UC_1_FILL_VALUES[UC_1_N_SOURCES] = {
- -1,
- -2,
- -3,
- -4,
- -5,
- -6
-};
-static int UC_1_VDS_FILL_VALUE = -9;
#endif /* UC_1_H */
diff --git a/tools/misc/vds/UC_1_one_dim_gen.c b/tools/misc/vds/UC_1_one_dim_gen.c
index ee56622..f47b982 100644
--- a/tools/misc/vds/UC_1_one_dim_gen.c
+++ b/tools/misc/vds/UC_1_one_dim_gen.c
@@ -27,6 +27,36 @@
#include "UC_common.h"
#include "UC_1.h"
+static hsize_t UC_1_VDS_DIMS[RANK] = {0, UC_1_FULL_HEIGHT, UC_1_WIDTH};
+static hsize_t UC_1_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_1_FULL_HEIGHT, UC_1_WIDTH};
+
+/* Planes */
+static hsize_t UC_1_PLANES[UC_1_N_SOURCES][RANK] = {
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH}
+};
+
+/* VDS file name */
+static char UC_1_VDS_FILE_NAME[NAME_LEN] = "1_vds.h5";
+
+/* Dataset names */
+static char UC_1_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
+static char UC_1_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+
+/* Fill values */
+static int UC_1_FILL_VALUES[UC_1_N_SOURCES] = {
+ -1,
+ -2,
+ -3,
+ -4,
+ -5,
+ -6
+};
+static int UC_1_VDS_FILL_VALUE = -9;
int
main(void)
@@ -44,7 +74,7 @@ main(void)
hsize_t extent[RANK]; /* dataset extents */
hsize_t start[RANK]; /* starting point for hyperslab */
- int map_start = -1; /* starting point in the VDS map */
+ hsize_t map_start = 0; /* starting point in the VDS map */
int *buffer = NULL; /* data buffer */
hsize_t count = 0; /* number of elements in a plane */
@@ -53,7 +83,7 @@ main(void)
int i; /* iterator */
int j; /* iterator */
- int k; /* iterator */
+ hsize_t k; /* iterator */
/* Start by creating the virtual dataset (VDS) dataspace and creation
@@ -136,7 +166,7 @@ main(void)
for(k = 0; k < count; k++)
buffer[k] = value;
- start[0] = j;
+ start[0] = (hsize_t)j;
start[1] = 0;
start[2] = 0;
if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_1_PLANES[i], NULL) < 0)
diff --git a/tools/misc/vds/UC_2.h b/tools/misc/vds/UC_2.h
index 8b9f19a..fe3f350 100644
--- a/tools/misc/vds/UC_2.h
+++ b/tools/misc/vds/UC_2.h
@@ -79,7 +79,6 @@ static hsize_t UC_2_DIMS[UC_2_N_SOURCES][RANK] = {
{0, UC_2_D_HEIGHT, UC_2_WIDTH},
{0, UC_2_E_HEIGHT, UC_2_WIDTH}
};
-static hsize_t UC_2_VDS_DIMS[RANK] = {0, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
/* Maximum size of datasets, both source and VDS */
static hsize_t UC_2_MAX_DIMS[UC_2_N_SOURCES][RANK] = {
@@ -89,36 +88,6 @@ static hsize_t UC_2_MAX_DIMS[UC_2_N_SOURCES][RANK] = {
{UC_2_N_MAX_PLANES, UC_2_D_HEIGHT, UC_2_WIDTH},
{UC_2_N_MAX_PLANES, UC_2_E_HEIGHT, UC_2_WIDTH}
};
-static hsize_t UC_2_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
-
-/* Positions of source datasets in the VDS */
-static hsize_t UC_2_POSITIONS[UC_2_N_SOURCES][RANK] = {
- /* A */ {0, 0, 0},
- /* B */ {0, UC_2_A_HEIGHT, 0},
- /* C */ {0, UC_2_AB_HEIGHT, 0},
- /* D */ {0, 0, UC_2_WIDTH},
- /* E */ {0, UC_2_D_HEIGHT, UC_2_WIDTH}
-};
-
-/* Planes */
-static hsize_t UC_2_PLANES[UC_2_N_SOURCES][RANK] = {
- {1, UC_2_A_HEIGHT, UC_2_WIDTH},
- {1, UC_2_B_HEIGHT, UC_2_WIDTH},
- {1, UC_2_C_HEIGHT, UC_2_WIDTH},
- {1, UC_2_D_HEIGHT, UC_2_WIDTH},
- {1, UC_2_E_HEIGHT, UC_2_WIDTH}
-};
-static hsize_t UC_2_VDS_SUB_IMAGE[RANK] = {1, UC_2_FULL_HEIGHT, UC_2_WIDTH};
-static hsize_t UC_2_VDS_PLANE[RANK] = {1, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
-
-/* Chunk dimensions */
-static hsize_t UC_2_CHUNK_DIMS[UC_2_N_SOURCES][RANK] = {
- {UC_2_N_PLANES_IN_SERIES, UC_2_A_HEIGHT, UC_2_WIDTH},
- {UC_2_N_PLANES_IN_SERIES, UC_2_B_HEIGHT, UC_2_WIDTH},
- {UC_2_N_PLANES_IN_SERIES, UC_2_C_HEIGHT, UC_2_WIDTH},
- {UC_2_N_PLANES_IN_SERIES, UC_2_D_HEIGHT, UC_2_WIDTH},
- {UC_2_N_PLANES_IN_SERIES, UC_2_E_HEIGHT, UC_2_WIDTH}
-};
/* File names for source datasets */
static char UC_2_FILE_NAMES[UC_2_N_SOURCES][NAME_LEN] = {
@@ -137,15 +106,5 @@ static char UC_2_FILE_NAMES[UC_2_N_SOURCES][NAME_LEN] = {
#define UC_2_SOURCE_DSET_PATH "/source_dset"
#define UC_2_VDS_DSET_NAME "vds_dset"
-/* Fill values */
-static int UC_2_FILL_VALUES[UC_2_N_SOURCES] = {
- -1,
- -2,
- -3,
- -4,
- -5
-};
-static int UC_2_VDS_FILL_VALUE = -9;
-
#endif /* UC_2_H */
diff --git a/tools/misc/vds/UC_2_two_dims_gen.c b/tools/misc/vds/UC_2_two_dims_gen.c
index c3dfa65..d08cc5f 100644
--- a/tools/misc/vds/UC_2_two_dims_gen.c
+++ b/tools/misc/vds/UC_2_two_dims_gen.c
@@ -27,6 +27,46 @@
#include "UC_common.h"
#include "UC_2.h"
+static hsize_t UC_2_VDS_DIMS[RANK] = {0, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
+static hsize_t UC_2_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
+
+/* Positions of source datasets in the VDS */
+static hsize_t UC_2_POSITIONS[UC_2_N_SOURCES][RANK] = {
+ /* A */ {0, 0, 0},
+ /* B */ {0, UC_2_A_HEIGHT, 0},
+ /* C */ {0, UC_2_AB_HEIGHT, 0},
+ /* D */ {0, 0, UC_2_WIDTH},
+ /* E */ {0, UC_2_D_HEIGHT, UC_2_WIDTH}
+};
+
+/* Planes */
+static hsize_t UC_2_PLANES[UC_2_N_SOURCES][RANK] = {
+ {1, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+
+/* Chunk dimensions */
+static hsize_t UC_2_CHUNK_DIMS[UC_2_N_SOURCES][RANK] = {
+ {UC_2_N_PLANES_IN_SERIES, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+
+/* Fill values */
+static int UC_2_FILL_VALUES[UC_2_N_SOURCES] = {
+ -1,
+ -2,
+ -3,
+ -4,
+ -5
+};
+static int UC_2_VDS_FILL_VALUE = -9;
+
int
main(void)
{
@@ -51,7 +91,7 @@ main(void)
int i; /* iterator */
int j; /* iterator */
- int k; /* iterator */
+ hsize_t k; /* iterator */
/* Start by creating the virtual dataset (VDS) dataspace and creation
@@ -132,7 +172,7 @@ main(void)
for(k = 0; k < count; k++)
buffer[k] = value;
- start[0] = j;
+ start[0] = (hsize_t)j;
start[1] = 0;
start[2] = 0;
if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_2_PLANES[i], NULL) < 0)
diff --git a/tools/misc/vds/UC_3.h b/tools/misc/vds/UC_3.h
index a27c3cf..0654a48 100644
--- a/tools/misc/vds/UC_3.h
+++ b/tools/misc/vds/UC_3.h
@@ -60,10 +60,6 @@ static hsize_t UC_32_POSITIONS[UC_2_N_SOURCES][RANK] = {
/* E */ {0, 8, 12}
};
-/* Planes */
-static hsize_t UC_31_VDS_PLANE[RANK] = {1, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH};
-static hsize_t UC_32_VDS_PLANE[RANK] = {1, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH};
-
/* VDS file names */
#define UC_31_VDS_FILE_NAME "3_1_vds.h5"
#define UC_32_VDS_FILE_NAME "3_2_vds.h5"
diff --git a/tools/misc/vds/UC_4_printf_gen.c b/tools/misc/vds/UC_4_printf_gen.c
index c0bb6b5..d067d47 100644
--- a/tools/misc/vds/UC_4_printf_gen.c
+++ b/tools/misc/vds/UC_4_printf_gen.c
@@ -51,7 +51,7 @@ main(void)
int i; /* iterator */
int j; /* iterator */
- int k; /* iterator */
+ hsize_t k; /* iterator */
/************************************
* Create source files and datasets *
@@ -112,7 +112,7 @@ main(void)
for(k = 0; k < n; k++)
buffer[k] = value;
- start[0] = j;
+ start[0] = (hsize_t)j;
start[1] = 0;
start[2] = 0;
if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_4_PLANE, NULL) < 0)
diff --git a/tools/misc/vds/UC_5_stride_gen.c b/tools/misc/vds/UC_5_stride_gen.c
index 9fa4908..38d24a6 100644
--- a/tools/misc/vds/UC_5_stride_gen.c
+++ b/tools/misc/vds/UC_5_stride_gen.c
@@ -44,7 +44,7 @@ main(void)
hsize_t start[RANK]; /* starting point for hyperslab */
hsize_t stride[RANK]; /* hypserslab stride */
hsize_t count[RANK]; /* hypserslab count */
- int map_start = -1; /* starting point in the VDS map */
+ hsize_t map_start = 0; /* starting point in the VDS map */
int *buffer = NULL; /* data buffer */
int value = -1; /* value written to datasets */
@@ -53,7 +53,7 @@ main(void)
int i; /* iterator */
int j; /* iterator */
- int k; /* iterator */
+ hsize_t k; /* iterator */
/* Start by creating the virtual dataset (VDS) dataspace and creation
* property list. The individual source datasets are then created
@@ -143,7 +143,7 @@ main(void)
for(k = 0; k < n; k++)
buffer[k] = value;
- start[0] = j;
+ start[0] = (hsize_t)j;
start[1] = 0;
start[2] = 0;
if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_5_PLANE, NULL) < 0)