summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:09 (GMT)
commit0a29514b9dd967deb64b53b39e12d6b55177b76c (patch)
treea0a2fce3c7a13fcdf1deed6c022a47bfb5a2cbf1 /tools
parent432f394cbbc6f77861501f91dc2fc5c209f3811f (diff)
downloadhdf5-0a29514b9dd967deb64b53b39e12d6b55177b76c.zip
hdf5-0a29514b9dd967deb64b53b39e12d6b55177b76c.tar.gz
hdf5-0a29514b9dd967deb64b53b39e12d6b55177b76c.tar.bz2
[svn-r8383] Purpose:
Code cleanup Description: Clean up lots of warnings based on those reported from the SGI compilers as well as gcc. Platforms tested: SGI O3900, IRIX64 6.5 (Cheryl's SGI machine) FreeBSD 4.9 (sleipnir) w/ & w/o parallel h5committest
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/testh5diff.h1
-rw-r--r--tools/h5diff/testh5diff_attr.c2
-rw-r--r--tools/h5diff/testh5diff_dset.c20
-rw-r--r--tools/h5dump/h5dump.c81
-rwxr-xr-xtools/h5import/h5import.c14
-rw-r--r--tools/h5ls/h5ls.c8
-rw-r--r--tools/h5repack/h5repack.h2
-rw-r--r--tools/h5repack/h5repack_copy.c36
-rw-r--r--tools/h5repack/h5repack_filters.c7
-rw-r--r--tools/h5repack/h5repack_main.c2
-rw-r--r--tools/h5repack/h5repack_opttable.c6
-rw-r--r--tools/h5repack/h5repack_refs.c28
-rw-r--r--tools/h5repack/h5repack_verify.c18
-rw-r--r--tools/h5repack/testh5repack_dset.c22
-rw-r--r--tools/h5repack/testh5repack_make.c25
-rw-r--r--tools/lib/h5diff.c14
-rw-r--r--tools/lib/h5diff_array.c24
-rw-r--r--tools/lib/h5diff_attr.c21
-rw-r--r--tools/lib/h5diff_dset.c9
-rw-r--r--tools/lib/h5diff_util.c2
-rw-r--r--tools/lib/h5tools.c6
-rw-r--r--tools/lib/h5tools_filters.c1
-rw-r--r--tools/lib/h5tools_str.c9
23 files changed, 147 insertions, 211 deletions
diff --git a/tools/h5diff/testh5diff.h b/tools/h5diff/testh5diff.h
index 5d9a651..13c02ea 100644
--- a/tools/h5diff/testh5diff.h
+++ b/tools/h5diff/testh5diff.h
@@ -14,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <assert.h>
#include "hdf5.h"
#include "H5private.h"
diff --git a/tools/h5diff/testh5diff_attr.c b/tools/h5diff/testh5diff_attr.c
index 5124792..fb6dc39 100644
--- a/tools/h5diff/testh5diff_attr.c
+++ b/tools/h5diff/testh5diff_attr.c
@@ -29,7 +29,7 @@
*/
-void write_attr_in(hid_t loc_id,
+static void write_attr_in(hid_t loc_id,
const char* dset_name, /* for saving reference to dataset*/
hid_t file_id,
int make_diffs /* flag to modify data buffers */)
diff --git a/tools/h5diff/testh5diff_dset.c b/tools/h5diff/testh5diff_dset.c
index 44b2445..8158c5e 100644
--- a/tools/h5diff/testh5diff_dset.c
+++ b/tools/h5diff/testh5diff_dset.c
@@ -29,7 +29,7 @@
*/
-void write_dset_in(hid_t loc_id,
+static void write_dset_in(hid_t loc_id,
const char* dset_name, /* for saving reference to dataset*/
hid_t file_id,
int make_diffs /* flag to modify data buffers */)
@@ -75,7 +75,6 @@ void write_dset_in(hid_t loc_id,
char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
hobj_ref_t buf42[3][2]; /* reference */
- e_t buf452[3][2]; /* enum */
hvl_t buf52[3][2]; /* vlen */
int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
@@ -89,7 +88,6 @@ void write_dset_in(hid_t loc_id,
char buf23[4][3][2]; /* bitfield, opaque */
s_t buf33[4][3][2]; /* compound */
hobj_ref_t buf43[4][3][2]; /* reference */
- e_t buf453[4][3][2]; /* enum */
hvl_t buf53[4][3][2]; /* vlen */
int buf63[24][3]; /* array */
int buf73[4][3][2]; /* integer */
@@ -347,13 +345,6 @@ void write_dset_in(hid_t loc_id,
*-------------------------------------------------------------------------
*/
- for (i=0; i<3; i++)
- for (j=0; j<2; j++)
- {
- if (make_diffs) buf452[i][j]=GREEN; else buf452[i][j]=RED;
- }
-
-
type_id = H5Tcreate(H5T_ENUM, sizeof(e_t));
H5Tenum_insert(type_id, "RED", (val = 0, &val));
H5Tenum_insert(type_id, "GREEN", (val = 1, &val));
@@ -533,15 +524,6 @@ void write_dset_in(hid_t loc_id,
*-------------------------------------------------------------------------
*/
-
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 3; j++) {
- for (k = 0; k < 2; k++) {
- if (make_diffs) buf453[i][j][k]=RED; else buf453[i][j][k]=GREEN;
- }
- }
- }
-
type_id = H5Tcreate(H5T_ENUM, sizeof(e_t));
H5Tenum_insert(type_id, "RED", (val = 0, &val));
H5Tenum_insert(type_id, "GREEN", (val = 1, &val));
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 2b997f1..f39c47a 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -69,7 +69,9 @@ static void dump_oid(hid_t oid);
static void print_enum(hid_t type);
static herr_t dump_all(hid_t group, const char *name, void *op_data);
static char *lookup_ref_path(hobj_ref_t );
+#ifdef LATER
static void check_compression(hid_t);
+#endif /* LATER */
static ref_path_table_entry_t *ref_path_table_lookup(const char *);
static int xml_name_to_XID(const char *, char *, int , int );
static int get_next_xid(void);
@@ -1341,8 +1343,8 @@ dump_all(hid_t group, const char *name, void * op_data)
strcat(strcat(tmp2, "/"), targbuf);
t_tmp = xml_escape_the_name(strcat(strcat(tmp, "/"), name));
- res = xml_name_to_XID(t_tmp,linkxid,100,1);
- res = xml_name_to_XID(prefix,parentxid,100,1);
+ xml_name_to_XID(t_tmp,linkxid,100,1);
+ xml_name_to_XID(prefix,parentxid,100,1);
res = xml_name_to_XID(tmp2,targetxid,100,0);
@@ -1451,7 +1453,6 @@ dump_all(hid_t group, const char *name, void * op_data)
dump_header_format->datasetblockend);
} else {
/* the XML version */
- int res;
char *t_tmp;
char *t_prefix;
char *t_name;
@@ -1463,8 +1464,8 @@ dump_all(hid_t group, const char *name, void * op_data)
t_tmp = xml_escape_the_name(strcat(strcat(tx_tmp, "/"), name));
t_prefix = xml_escape_the_name(prefix);
t_name = xml_escape_the_name(name);
- res = xml_name_to_XID( strcat(strcat(tmp,"/"),name), dsetxid,100,1);
- res = xml_name_to_XID( prefix ,parentxid,100,1);
+ xml_name_to_XID( strcat(strcat(tmp,"/"),name), dsetxid,100,1);
+ xml_name_to_XID( prefix ,parentxid,100,1);
printf("<%sDataset Name=\"%s\" OBJ-XID=\"%s-%d\" "
"H5Path=\"%s\" Parents=\"%s\" "
@@ -1475,7 +1476,7 @@ dump_all(hid_t group, const char *name, void * op_data)
(strcmp(prefix, "") ? t_prefix : "/"));
indentation(indent + COL);
- res = xml_name_to_XID(dset_table->objs[i].objname,pointerxid,100,1);
+ xml_name_to_XID(dset_table->objs[i].objname,pointerxid,100,1);
printf("<%sDatasetPtr OBJ-XID=\"%s\" H5Path=\"%s\"/>\n",
xmlnsprefix,
pointerxid,t_tmp);
@@ -3684,9 +3685,8 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* This should be defined somewhere else */
/* These 2 cases are handled the same right now, but
probably will have something different eventually */
- int res;
char * dtxid = malloc(100);
- res = xml_name_to_XID(type_table->objs[ret].objname,dtxid,100,1);
+ xml_name_to_XID(type_table->objs[ret].objname,dtxid,100,1);
if (!type_table->objs[ret].recorded) {
/* 'anonymous' NDT. Use it's object num.
as it's name. */
@@ -4052,9 +4052,8 @@ xml_dump_datatype(hid_t type)
if (i >= 0) {
/* Shared data type, must be entered as an object */
/* These 2 cases are the same now, but may change */
- int res;
char * dtxid = malloc(100);
- res = xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1);
+ xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1);
if (!type_table->objs[i].recorded) {
/* anonymous stored data type:
following the dumper's current
@@ -4398,7 +4397,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data)
static void
xml_dump_named_datatype(hid_t type, const char *name)
{
- int res;
char *tmp;
char * dtxid;
char * parentxid;
@@ -4417,8 +4415,8 @@ xml_dump_named_datatype(hid_t type, const char *name)
/*char **/t_tmp = xml_escape_the_name(tmp);
/*char **/t_prefix = xml_escape_the_name(prefix);
/*char **/t_name = xml_escape_the_name(name);
- res = xml_name_to_XID(tmp,dtxid,100,1);
- res = xml_name_to_XID(prefix,parentxid,100,1);
+ xml_name_to_XID(tmp,dtxid,100,1);
+ xml_name_to_XID(prefix,parentxid,100,1);
if (strncmp(name, "#", 1) == 0) {
/* Special: this is an 'anonymous' NDT, deleted but
still in use.
@@ -4525,20 +4523,19 @@ xml_dump_group(hid_t gid, const char *name)
d_status = EXIT_FAILURE;
} else if (group_table->objs[i].displayed) {
/* already seen: enter a groupptr */
- int res;
char *t_name = xml_escape_the_name(name);
char *grpxid = malloc(100);
char *parentxid = malloc(100);
if (isRoot) {
/* probably can't happen! */
- res = xml_name_to_XID("/",grpxid,100,1);
+ xml_name_to_XID("/",grpxid,100,1);
printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix,grpxid,"/");
} else {
t_objname = xml_escape_the_name(group_table->objs[i].objname);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(tmp,grpxid,100,1);
- res = xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(tmp,grpxid,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s-%d\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\">\n",
xmlnsprefix,t_name, grpxid, get_next_xid(),
@@ -4553,8 +4550,8 @@ xml_dump_group(hid_t gid, const char *name)
ptrstr = malloc(100);
t_objname = xml_escape_the_name(group_table->objs[i].objname);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(par,parentxid,100,1);
- res = xml_name_to_XID(group_table->objs[i].objname,ptrstr,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(group_table->objs[i].objname,ptrstr,100,1);
printf("<%sGroupPtr OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" />\n",
xmlnsprefix,
@@ -4565,19 +4562,18 @@ xml_dump_group(hid_t gid, const char *name)
} else {
/* first time this group has been seen -- describe it */
- int res;
char *t_name = xml_escape_the_name(name);
char *grpxid = malloc(100);
char *parentxid = malloc(100);
if (isRoot) {
- res = xml_name_to_XID("/",grpxid,100,1);
+ xml_name_to_XID("/",grpxid,100,1);
printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix,grpxid,"/");
} else {
char *t_tmp = xml_escape_the_name(tmp);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(tmp,grpxid,100,1);
- res = xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(tmp,grpxid,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" >\n",
xmlnsprefix,t_name, grpxid, t_tmp, parentxid, par_name);
@@ -4622,19 +4618,18 @@ xml_dump_group(hid_t gid, const char *name)
} else {
/* only link -- must be first time! */
- int res;
char *t_name = xml_escape_the_name(name);
char *grpxid = malloc(100);
char *parentxid = malloc(100);
if (isRoot) {
- res = xml_name_to_XID("/",grpxid,100,1);
+ xml_name_to_XID("/",grpxid,100,1);
printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix,grpxid,"/");
} else {
char *t_tmp = xml_escape_the_name(tmp);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(tmp,grpxid,100,1);
- res = xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(tmp,grpxid,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" >\n",
xmlnsprefix,t_name, grpxid, t_tmp,
@@ -4804,7 +4799,7 @@ xml_print_strs(hid_t did, int source)
char *bp;
char *onestring=NULL;
hsize_t ssiz;
- size_t tsiz, str_size;
+ size_t tsiz, str_size=0;
size_t i;
htri_t is_vlstr;
@@ -4871,9 +4866,9 @@ xml_print_strs(hid_t did, int source)
if(is_vlstr) {
onestring = *(char **)bp;
if(onestring)
- str_size = (size_t)strlen(onestring);
+ str_size = (size_t)HDstrlen(onestring);
} else {
- strncpy(onestring, bp, tsiz);
+ HDstrncpy(onestring, bp, tsiz);
str_size = tsiz;
}
indentation(indent + COL);
@@ -4907,6 +4902,7 @@ xml_print_strs(hid_t did, int source)
*
*-------------------------------------------------------------------------
*/
+#ifdef LATER
static void
check_compression(hid_t dcpl)
{
@@ -4937,6 +4933,8 @@ check_compression(hid_t dcpl)
}
}
}
+#endif /* LATER */
+
/*-------------------------------------------------------------------------
* Function: check_filters
*
@@ -4966,7 +4964,7 @@ check_filters(hid_t dcpl)
if (nfilt <= 0)
return;
for (i = 0; i < nfilt; i++) {
- filter = H5Pget_filter(dcpl, i, &flags,
+ filter = H5Pget_filter(dcpl, (unsigned)i, &flags,
(size_t *) &cd_nelmts,
cd_values, 120, namebuf);
if (filter == H5Z_FILTER_DEFLATE) {
@@ -5033,10 +5031,10 @@ check_filters(hid_t dcpl)
}
}
-static void xml_dump_fill_value(hid_t dcpl, hid_t type)
+static void xml_dump_fill_value(hid_t type)
{
-int sz;
-int i;
+size_t sz;
+size_t i;
hsize_t space;
void * buf;
char * path;
@@ -5098,6 +5096,7 @@ char * name;
printf("\"");
for (i = 0; i < sz; i++) {
printf("%x ",*(unsigned int *)buf);
+ buf = (char *)buf + sizeof(unsigned int);
}
printf("\"\n");
indentation(indent);
@@ -5168,7 +5167,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
{
hid_t type, space;
hid_t dcpl;
- herr_t err;
H5D_fill_value_t fvstatus;
int maxdims;
hsize_t *chsize;
@@ -5176,7 +5174,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
int i;
H5D_alloc_time_t at;
H5D_fill_time_t ft;
- int res;
hsize_t tempi;
char *tmp;
char *t_name, *t_tmp, *t_prefix;
@@ -5193,8 +5190,8 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
t_tmp = xml_escape_the_name(tmp);
t_prefix = xml_escape_the_name(prefix);
- res = xml_name_to_XID(tmp, rstr, 100, 1);
- res = xml_name_to_XID(prefix, pstr, 100, 1);
+ xml_name_to_XID(tmp, rstr, 100, 1);
+ xml_name_to_XID(prefix, pstr, 100, 1);
printf("<%sDataset Name=\"%s\" OBJ-XID=\"%s\" H5Path= \"%s\" Parents=\"%s\" H5ParentPaths=\"%s\">\n",xmlnsprefix,
t_name, rstr, t_tmp, pstr, strcmp(prefix, "") ? t_prefix : "/");
@@ -5279,7 +5276,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
indent += COL;
indentation(indent);
printf("<%sFillValueInfo ",xmlnsprefix);
- err = H5Pget_fill_time(dcpl, &ft);
+ H5Pget_fill_time(dcpl, &ft);
printf("FillTime=\"");
switch ( ft ) {
case H5D_FILL_TIME_ALLOC:
@@ -5296,7 +5293,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
break;
}
printf("\" ");
- err = H5Pget_alloc_time(dcpl, &at);
+ H5Pget_alloc_time(dcpl, &at);
printf("AllocationTime=\"");
switch ( at ) {
case H5D_ALLOC_TIME_EARLY:
@@ -5320,13 +5317,13 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
indentation(indent);
printf("<%sFillValue>\n",xmlnsprefix);
indent += COL;
- err = H5Pfill_value_defined(dcpl, &fvstatus);
+ H5Pfill_value_defined(dcpl, &fvstatus);
if (fvstatus == H5D_FILL_VALUE_UNDEFINED ||
(fvstatus==H5D_FILL_VALUE_DEFAULT && ft==H5D_FILL_TIME_IFSET)) {
indentation(indent + COL);
printf("<%sNoFill/>\n",xmlnsprefix);
} else {
- xml_dump_fill_value(dcpl,type);
+ xml_dump_fill_value(type);
}
indent -= COL;
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 8e073fa..ff1622d 100755
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -158,7 +158,7 @@ int main(int argc, char *argv[])
break;
case 14: /* read data size */
- if (getInputSize(in, HDstrtol(argv[i], NULL, BASE_10)) == -1)
+ if (getInputSize(in, (int)HDstrtol(argv[i], NULL, BASE_10)) == -1)
{
(void) fprintf(stderr, err8, argv[i]);
goto err;
@@ -384,7 +384,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -418,7 +417,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -451,7 +449,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -486,7 +483,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
#endif /* ifndef WIN32 */
@@ -551,7 +547,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -584,7 +579,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -617,7 +611,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -652,7 +645,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
#endif /* ifndef WIN32 */
@@ -716,7 +708,6 @@ readFloatData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -754,7 +745,6 @@ readFloatData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -1796,12 +1786,10 @@ getCompressionParameter(struct Input *in, FILE** strm)
}
in->compressionParam = ival;
return (0);
- break;
default:
(void) fprintf(stderr, err3);
return (-1);
- break;
}
}
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 447119e..d3c30ab 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1537,7 +1537,7 @@ dataset_list2(hid_t dset, const char UNUSED *name)
/* Print information about external strorage */
if ((nf = H5Pget_external_count(dcpl))>0) {
for (i=0, max_len=0; i<nf; i++) {
- H5Pget_external(dcpl, i, sizeof(f_name), f_name, NULL, NULL);
+ H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL);
n = display_string(NULL, f_name, TRUE);
max_len = MAX(max_len, n);
}
@@ -1550,7 +1550,7 @@ dataset_list2(hid_t dset, const char UNUSED *name)
for (i=0; i<max_len; i++) putchar('-');
putchar('\n');
for (i=0, total=0; i<nf; i++) {
- if (H5Pget_external(dcpl, i, sizeof(f_name), f_name, &f_offset,
+ if (H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, &f_offset,
&f_size)<0) {
HDfprintf(stdout,
" #%03d %10Hu %10s %10s ***ERROR*** %s\n",
@@ -1578,7 +1578,7 @@ dataset_list2(hid_t dset, const char UNUSED *name)
if ((nf = H5Pget_nfilters(dcpl))>0) {
for (i=0; i<nf; i++) {
cd_nelmts = NELMTS(cd_values);
- filt_id = H5Pget_filter(dcpl, i, &filt_flags, &cd_nelmts,
+ filt_id = H5Pget_filter(dcpl, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name);
f_name[sizeof(f_name)-1] = '\0';
sprintf(s, "Filter-%d:", i);
@@ -2009,7 +2009,7 @@ main (int argc, const char *argv[])
iter_t iter;
static char root_name[] = "/";
char drivername[50];
- char *preferred_driver=NULL;
+ const char *preferred_driver=NULL;
/* Initialize h5tools lib */
h5tools_init();
diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h
index 8e7e195..b91d516 100644
--- a/tools/h5repack/h5repack.h
+++ b/tools/h5repack/h5repack.h
@@ -99,7 +99,7 @@ typedef struct {
chunk_info_t chunk_g; /*global chunk INFO for the ALL case */
H5D_layout_t layout_g; /*global layout information for the ALL case */
int verbose; /*verbose mode */
- int threshold; /*minimum size to compress, in bytes */
+ hsize_t threshold; /*minimum size to compress, in bytes */
} pack_opt_t;
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index c74f5a4..7763bd2 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -141,23 +141,25 @@ int do_copy_objects(hid_t fidin,
trav_table_t *travt,
pack_opt_t *options) /* repack options */
{
- hid_t grp_in; /* group ID */
- hid_t grp_out; /* group ID */
- hid_t dset_in; /* read dataset ID */
- hid_t dset_out; /* write dataset ID */
- hid_t type_in; /* named type ID */
- hid_t type_out; /* named type ID */
- hid_t dcpl_id; /* dataset creation property list ID */
- hid_t space_id; /* space ID */
- hid_t ftype_id; /* file data type ID */
- hid_t mtype_id; /* memory data type ID */
+ hid_t grp_in=-1; /* group ID */
+ hid_t grp_out=-1; /* group ID */
+ hid_t dset_in=-1; /* read dataset ID */
+ hid_t dset_out=-1; /* write dataset ID */
+ hid_t type_in=-1; /* named type ID */
+ hid_t type_out=-1; /* named type ID */
+ hid_t dcpl_id=-1; /* dataset creation property list ID */
+ hid_t space_id=-1; /* space ID */
+ hid_t ftype_id=-1; /* file data type ID */
+ hid_t mtype_id=-1; /* memory data type ID */
size_t msize; /* memory size of memory type */
void *buf=NULL; /* data buffer */
hsize_t nelmts; /* number of elements in dataset */
int rank; /* rank of dataset */
hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */
hsize_t dsize_in; /* input dataset size before filter */
+#ifdef LATER
hsize_t dsize_out; /* output dataset size after filter */
+#endif /* LATER */
int i, j;
/*-------------------------------------------------------------------------
@@ -308,12 +310,14 @@ int do_copy_objects(hid_t fidin,
if (copy_attr(dset_in,dset_out,options)<0)
goto error;
+#ifdef LATER
/*-------------------------------------------------------------------------
* store the storage sizes
*-------------------------------------------------------------------------
*/
dsize_out=H5Dget_storage_size(dset_out);
+#endif /* LATER */
/*close */
if (H5Dclose(dset_out)<0)
@@ -482,13 +486,13 @@ int copy_attr(hid_t loc_in,
pack_opt_t *options
)
{
- hid_t attr_id; /* attr ID */
- hid_t attr_out; /* attr ID */
- hid_t space_id; /* space ID */
- hid_t ftype_id; /* file data type ID */
- hid_t mtype_id; /* memory data type ID */
+ hid_t attr_id=-1; /* attr ID */
+ hid_t attr_out=-1; /* attr ID */
+ hid_t space_id=-1; /* space ID */
+ hid_t ftype_id=-1; /* file data type ID */
+ hid_t mtype_id=-1; /* memory data type ID */
size_t msize; /* memory size of type */
- void *buf; /* data buffer */
+ void *buf=NULL; /* data buffer */
hsize_t nelmts; /* number of elements in dataset */
int rank; /* rank of dataset */
hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c
index 9aacdd3..c8b9b5d 100644
--- a/tools/h5repack/h5repack_filters.c
+++ b/tools/h5repack/h5repack_filters.c
@@ -143,7 +143,7 @@ int apply_filters(const char* name, /* object name from traverse list */
{
if (options->verbose)
printf("Warning: Filter not applied to <%s>. Dataset smaller than <%d> bytes\n",
- name,options->threshold);
+ name,(int)options->threshold);
return 0;
}
@@ -346,7 +346,7 @@ int check_szip(hid_t type_id, /* dataset datatype */
unsigned *szip_pixels_per_block /*IN,OUT*/,
pack_opt_t *options)
{
- size_t size; /* size of datatype in bytes */
+ size_t size=0; /* size of datatype in bytes */
szip_comp_t szip;
int i;
unsigned ppb=*szip_pixels_per_block;
@@ -360,7 +360,6 @@ int check_szip(hid_t type_id, /* dataset datatype */
{
default:
return 0;
- break;
case H5T_INTEGER:
case H5T_FLOAT:
break;
@@ -437,7 +436,7 @@ int check_szip(hid_t type_id, /* dataset datatype */
szip.bits_per_pixel = 64;
break;
default:
- printf("Warning: Invalid numeric type of size <%d> for SZIP\n",size);
+ printf("Warning: Invalid numeric type of size <%u> for SZIP\n",(unsigned)size);
return 0;
}}
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 8056fcc..cc3f6ea 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
else if (strcmp(argv[i], "-m") == 0) {
options.threshold = parse_number(argv[i+1]);
- if (options.threshold==-1) {
+ if ((int)options.threshold==-1) {
printf("Error: Invalid treshold size <%s>\n",argv[i+1]);
exit(1);
}
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index fa7fd11..45dfac5 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -41,7 +41,7 @@ void init_packobject(pack_info_t *obj)
}
obj->chunk.rank = -1;
obj->refobj_id = -1;
- obj->layout = -1;
+ obj->layout = H5D_LAYOUT_ERROR;
obj->nfilters = 0;
@@ -104,7 +104,7 @@ static int aux_inctable(pack_opttbl_t *table, int n_objs )
}
table->objs[i].chunk.rank = -1;
table->objs[i].refobj_id = -1;
- table->objs[i].layout = -1;
+ table->objs[i].layout = H5D_LAYOUT_ERROR;
table->objs[i].nfilters = 0;
}
return 0;
@@ -148,7 +148,7 @@ int options_table_init( pack_opttbl_t **tbl )
}
table->objs[i].chunk.rank = -1;
table->objs[i].refobj_id = -1;
- table->objs[i].layout = -1;
+ table->objs[i].layout = H5D_LAYOUT_ERROR;
table->objs[i].nfilters = 0;
}
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index 5955a08..e824493 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -52,15 +52,15 @@ int do_copy_refobjs(hid_t fidin,
trav_table_t *travt,
pack_opt_t *options) /* repack options */
{
- hid_t grp_in; /* group ID */
- hid_t grp_out; /* group ID */
- hid_t dset_in; /* read dataset ID */
- hid_t dset_out; /* write dataset ID */
- hid_t type_in; /* named type ID */
- hid_t dcpl_id; /* dataset creation property list ID */
- hid_t space_id; /* space ID */
- hid_t ftype_id; /* file data type ID */
- hid_t mtype_id; /* memory data type ID */
+ hid_t grp_in=-1; /* group ID */
+ hid_t grp_out=-1; /* group ID */
+ hid_t dset_in=-1; /* read dataset ID */
+ hid_t dset_out=-1; /* write dataset ID */
+ hid_t type_in=-1; /* named type ID */
+ hid_t dcpl_id=-1; /* dataset creation property list ID */
+ hid_t space_id=-1; /* space ID */
+ hid_t ftype_id=-1; /* file data type ID */
+ hid_t mtype_id=-1; /* memory data type ID */
size_t msize; /* memory size of memory type */
hsize_t nelmts; /* number of elements in dataset */
int rank; /* rank of dataset */
@@ -458,11 +458,11 @@ static int copy_refs_attr(hid_t loc_in,
hid_t fidout /* for saving references */
)
{
- hid_t attr_id; /* attr ID */
- hid_t attr_out; /* attr ID */
- hid_t space_id; /* space ID */
- hid_t ftype_id; /* file data type ID */
- hid_t mtype_id; /* memory data type ID */
+ hid_t attr_id=-1; /* attr ID */
+ hid_t attr_out=-1; /* attr ID */
+ hid_t space_id=-1; /* space ID */
+ hid_t ftype_id=-1; /* file data type ID */
+ hid_t mtype_id=-1; /* memory data type ID */
size_t msize; /* memory size of type */
hsize_t nelmts; /* number of elements in dataset */
int rank; /* rank of dataset */
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index e1c01eb..4f69d5f 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -157,9 +157,9 @@ int h5repack_verify(const char *fname,
pack_opt_t *options)
{
hid_t fid; /* file ID */
- hid_t dset_id; /* dataset ID */
- hid_t dcpl_id; /* dataset creation property list ID */
- hid_t space_id; /* space ID */
+ hid_t dset_id=-1; /* dataset ID */
+ hid_t dcpl_id=-1; /* dataset creation property list ID */
+ hid_t space_id=-1; /* space ID */
int ret=1, i, j;
trav_table_t *travt=NULL;
@@ -343,12 +343,12 @@ error:
int h5repack_cmpdcpl(const char *fname1,
const char *fname2)
{
- hid_t fid1; /* file ID */
- hid_t fid2; /* file ID */
- hid_t dset1; /* dataset ID */
- hid_t dset2; /* dataset ID */
- hid_t dcpl1; /* dataset creation property list ID */
- hid_t dcpl2; /* dataset creation property list ID */
+ hid_t fid1=-1; /* file ID */
+ hid_t fid2=-1; /* file ID */
+ hid_t dset1=-1; /* dataset ID */
+ hid_t dset2=-1; /* dataset ID */
+ hid_t dcpl1=-1; /* dataset creation property list ID */
+ hid_t dcpl2=-1; /* dataset creation property list ID */
trav_table_t *travt1=NULL;
trav_table_t *travt2=NULL;
int ret=1, i;
diff --git a/tools/h5repack/testh5repack_dset.c b/tools/h5repack/testh5repack_dset.c
index 74ca97e..57a5b27 100644
--- a/tools/h5repack/testh5repack_dset.c
+++ b/tools/h5repack/testh5repack_dset.c
@@ -17,7 +17,9 @@
#include "h5repack.h"
static void make_dset_reg_ref(hid_t loc_id);
+#ifdef LATER
static void read_dset_reg_ref(hid_t loc_id);
+#endif /* LATER */
@@ -80,7 +82,6 @@ void write_dset_in(hid_t loc_id,
char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
hobj_ref_t buf42[3][2]; /* reference */
- e_t buf452[3][2]; /* enum */
hvl_t buf52[3][2]; /* vlen */
int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
@@ -94,7 +95,6 @@ void write_dset_in(hid_t loc_id,
char buf23[4][3][2]; /* bitfield, opaque */
s_t buf33[4][3][2]; /* compound */
hobj_ref_t buf43[4][3][2]; /* reference */
- e_t buf453[4][3][2]; /* enum */
hvl_t buf53[4][3][2]; /* vlen */
int buf63[24][3]; /* array */
int buf73[4][3][2]; /* integer */
@@ -360,13 +360,6 @@ void write_dset_in(hid_t loc_id,
*-------------------------------------------------------------------------
*/
- for (i=0; i<3; i++)
- for (j=0; j<2; j++)
- {
- if (make_diffs) buf452[i][j]=GREEN; else buf452[i][j]=RED;
- }
-
-
type_id = H5Tcreate(H5T_ENUM, sizeof(e_t));
H5Tenum_insert(type_id, "RED", (val = 0, &val));
H5Tenum_insert(type_id, "GREEN", (val = 1, &val));
@@ -546,15 +539,6 @@ void write_dset_in(hid_t loc_id,
*-------------------------------------------------------------------------
*/
-
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 3; j++) {
- for (k = 0; k < 2; k++) {
- if (make_diffs) buf453[i][j][k]=RED; else buf453[i][j][k]=GREEN;
- }
- }
- }
-
type_id = H5Tcreate(H5T_ENUM, sizeof(e_t));
H5Tenum_insert(type_id, "RED", (val = 0, &val));
H5Tenum_insert(type_id, "GREEN", (val = 1, &val));
@@ -741,6 +725,7 @@ static void make_dset_reg_ref(hid_t loc_id)
*-------------------------------------------------------------------------
*/
+#ifdef LATER
static void read_dset_reg_ref(hid_t loc_id)
{
hid_t dset1; /* Dataset ID */
@@ -838,3 +823,4 @@ static void read_dset_reg_ref(hid_t loc_id)
free(rbuf);
free(drbuf);
}
+#endif /* LATER */
diff --git a/tools/h5repack/testh5repack_make.c b/tools/h5repack/testh5repack_make.c
index 3b8cb5c..c69abd9 100644
--- a/tools/h5repack/testh5repack_make.c
+++ b/tools/h5repack/testh5repack_make.c
@@ -20,7 +20,7 @@
int make_all_objects(hid_t loc_id);
int make_attributes(hid_t loc_id);
int make_special_objects(hid_t loc_id);
-int make_early();
+int make_early(void);
@@ -245,7 +245,6 @@ int make_special_objects(hid_t loc_id)
hid_t dset_id;
hid_t space_id;
hid_t plist_id;
- herr_t status;
int fillvalue=2;
/*-------------------------------------------------------------------------
@@ -290,13 +289,13 @@ int make_special_objects(hid_t loc_id)
*/
plist_id = H5Pcreate(H5P_DATASET_CREATE);
- status = H5Pset_fill_value(plist_id, H5T_NATIVE_INT, &fillvalue);
+ H5Pset_fill_value(plist_id, H5T_NATIVE_INT, &fillvalue);
space_id = H5Screate_simple(2,dims,NULL);
dset_id = H5Dcreate(loc_id,"dset_fill",H5T_NATIVE_INT,space_id,plist_id);
- status = H5Dwrite(dset_id,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf);
- status = H5Pclose(plist_id);
- status = H5Dclose(dset_id);
- status = H5Sclose(space_id);
+ H5Dwrite(dset_id,H5T_NATIVE_INT,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf);
+ H5Pclose(plist_id);
+ H5Dclose(dset_id);
+ H5Sclose(space_id);
return 0;
@@ -310,15 +309,15 @@ int make_special_objects(hid_t loc_id)
*
*-------------------------------------------------------------------------
*/
-int make_early()
+int make_early(void)
{
hsize_t dims[1] ={3000};
hsize_t cdims[1]={30};
- hid_t fid;
- hid_t dset_id;
- hid_t sid;
- hid_t tid;
- hid_t dcpl;
+ hid_t fid=-1;
+ hid_t dset_id=-1;
+ hid_t sid=-1;
+ hid_t tid=-1;
+ hid_t dcpl=-1;
int i;
char name[10];
int iter=100;
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 38acf82..9ac321b 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -12,13 +12,9 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
+#include <stdlib.h>
#include "h5diff.h"
#include "H5private.h"
-#include <stdlib.h>
-#include <assert.h>
-
-
/*-------------------------------------------------------------------------
* Function: h5diff
@@ -375,10 +371,10 @@ int diff( hid_t file1_id,
diff_opt_t *options,
H5G_obj_t type )
{
- hid_t type1_id;
- hid_t type2_id;
- hid_t grp1_id;
- hid_t grp2_id;
+ hid_t type1_id=-1;
+ hid_t type2_id=-1;
+ hid_t grp1_id=-1;
+ hid_t grp2_id=-1;
int ret;
H5G_stat_t sb1;
H5G_stat_t sb2;
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 90a50cd..838cc3d 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -12,12 +12,9 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
+#include <math.h>
#include "h5diff.h"
#include "H5private.h"
-#include <assert.h>
-#include <math.h>
-
static int diff_datum(void *_mem1,
void *_mem2,
@@ -35,7 +32,6 @@ static int diff_datum(void *_mem1,
static int diff_native_uchar(unsigned char *mem1,
unsigned char *mem2,
- size_t type_size,
hsize_t i,
int rank,
hsize_t *acc,
@@ -47,7 +43,6 @@ static int diff_native_uchar(unsigned char *mem1,
static int diff_char(unsigned char *mem1,
unsigned char *mem2,
- size_t type_size,
hsize_t i,
int rank,
hsize_t *acc,
@@ -119,7 +114,7 @@ int diff_array( void *_mem1,
tmp1,
tmp2,
m_type,
- 0,
+ (hsize_t)0,
rank,
acc,
pos,
@@ -270,8 +265,8 @@ int diff_datum( void *_mem1,
nmembs = H5Tget_nmembers(m_type);
for (j = 0; j < nmembs; j++)
{
- offset = H5Tget_member_offset(m_type, j);
- memb_type = H5Tget_member_type(m_type, j);
+ offset = H5Tget_member_offset(m_type, (unsigned)j);
+ memb_type = H5Tget_member_type(m_type, (unsigned)j);
nfound+=diff_datum(
mem1+offset,
mem2+offset,
@@ -305,7 +300,6 @@ int diff_datum( void *_mem1,
nfound+=diff_char(
mem1 + u,
mem2 + u, /* offset */
- type_size,
i, /* index position */
rank,
acc,
@@ -329,7 +323,6 @@ int diff_datum( void *_mem1,
nfound+=diff_native_uchar(
mem1 + u,
mem2 + u, /* offset */
- type_size,
i, /* index position */
rank,
acc,
@@ -352,7 +345,6 @@ int diff_datum( void *_mem1,
nfound+=diff_native_uchar(
mem1 + u,
mem2 + u, /* offset */
- type_size,
i, /* index position */
rank,
acc,
@@ -403,7 +395,6 @@ int diff_datum( void *_mem1,
nfound+=diff_native_uchar(
mem1 + u,
mem2 + u, /* offset */
- type_size,
i, /* index position */
rank,
acc,
@@ -466,7 +457,7 @@ int diff_datum( void *_mem1,
/* get the number of sequence elements */
nelmts = ((hvl_t *)mem1)->len;
- for (j = 0; j < nelmts; j++)
+ for (j = 0; j < (int)nelmts; j++)
nfound+=diff_datum(
((char *)(((hvl_t *)mem1)->p)) + j * size,
((char *)(((hvl_t *)mem2)->p)) + j * size, /* offset */
@@ -1526,7 +1517,6 @@ int diff_datum( void *_mem1,
static
int diff_native_uchar(unsigned char *mem1,
unsigned char *mem2,
- size_t type_size,
hsize_t i,
int rank,
hsize_t *acc,
@@ -1620,7 +1610,6 @@ int diff_native_uchar(unsigned char *mem1,
static
int diff_char(unsigned char *mem1,
unsigned char *mem2,
- size_t type_size,
hsize_t i,
int rank,
hsize_t *acc,
@@ -1823,4 +1812,5 @@ static int diff_region(hid_t region1_id, hid_t region2_id)
}
return ret;
-} \ No newline at end of file
+}
+
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index ed051f8..65e16ba 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -14,7 +14,6 @@
#include "h5diff.h"
#include "H5private.h"
-#include <assert.h>
/*-------------------------------------------------------------------------
@@ -45,14 +44,14 @@ int diff_attr(hid_t loc1_id,
diff_opt_t *options
)
{
- hid_t attr1_id; /* attr ID */
- hid_t attr2_id; /* attr ID */
- hid_t space1_id; /* space ID */
- hid_t space2_id; /* space ID */
- hid_t ftype1_id; /* file data type ID */
- hid_t ftype2_id; /* file data type ID */
- hid_t mtype1_id; /* memory data type ID */
- hid_t mtype2_id; /* memory data type ID */
+ hid_t attr1_id=-1; /* attr ID */
+ hid_t attr2_id=-1; /* attr ID */
+ hid_t space1_id=-1; /* space ID */
+ hid_t space2_id=-1; /* space ID */
+ hid_t ftype1_id=-1; /* file data type ID */
+ hid_t ftype2_id=-1; /* file data type ID */
+ hid_t mtype1_id=-1; /* memory data type ID */
+ hid_t mtype2_id=-1; /* memory data type ID */
size_t msize1; /* memory size of memory type */
size_t msize2; /* memory size of memory type */
void *buf1=NULL; /* data buffer */
@@ -87,9 +86,9 @@ int diff_attr(hid_t loc1_id,
*-------------------------------------------------------------------------
*/
/* open attribute */
- if ((attr1_id = H5Aopen_idx(loc1_id, i))<0)
+ if ((attr1_id = H5Aopen_idx(loc1_id, (unsigned)i))<0)
goto error;
- if ((attr2_id = H5Aopen_idx(loc2_id, i))<0)
+ if ((attr2_id = H5Aopen_idx(loc2_id, (unsigned)i))<0)
goto error;
/* get name */
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 8cd5b32..55a0f73 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -15,7 +15,6 @@
#include "h5diff.h"
#include "H5private.h"
#include "h5tools.h"
-#include <assert.h>
/*-------------------------------------------------------------------------
* Function: diff_dataset
@@ -39,8 +38,8 @@ int diff_dataset( hid_t file1_id,
{
hid_t dset1_id =-1;
hid_t dset2_id =-1;
- hid_t dcpl1_id;
- hid_t dcpl2_id;
+ hid_t dcpl1_id=-1;
+ hid_t dcpl2_id=-1;
int gout=0, nfound=0;
@@ -146,11 +145,9 @@ int diff_datasetid( hid_t dset1_id,
int nfound=0; /* number of differences found */
const char *name1=NULL; /* relative names */
const char *name2=NULL;
- int maxdim_diff=0; /* maximum dimensions are different */
- int dim_diff=0; /* current dimensions are different */
hsize_t storage_size1;
hsize_t storage_size2;
- int i, gout=0;
+ int i;
/* Get the dataspace handle */
if ( (space1_id = H5Dget_space(dset1_id)) < 0 )
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index 9c1d2d1..7af48c4 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -15,8 +15,6 @@
#include "h5diff.h"
#include "H5private.h"
-#include <assert.h>
-
/*-------------------------------------------------------------------------
* Function: print_pos
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index b07742b..3a5b68a 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -53,7 +53,9 @@ FILE *rawdatastream; /* should initialize to stdout but gcc moans about it
/* module-scoped variables */
static int h5tools_init_g; /* if h5tools lib has been initialized */
+#ifdef H5_HAVE_PARALLEL
static int h5tools_mpi_init_g; /* if MPI_Init() has been called */
+#endif /* H5_HAVE_PARALLEL */
/* Names of VFDs */
static const char *drivernames[]={
@@ -220,7 +222,7 @@ h5tools_get_fapl(const char *driver, unsigned *drivernum, int argc, const char *
/* Initialize the MPI library, if it wasn't already */
if(!h5tools_mpi_init_g) {
- MPI_Init(&argc, &argv);
+ MPI_Init(&argc, (char ***)&argv);
h5tools_mpi_init_g=1;
} /* end if */
@@ -235,7 +237,7 @@ h5tools_get_fapl(const char *driver, unsigned *drivernum, int argc, const char *
/* Initialize the MPI library, if it wasn't already */
if(!h5tools_mpi_init_g) {
- MPI_Init(&argc, &argv);
+ MPI_Init(&argc, (char ***)&argv);
h5tools_mpi_init_g=1;
} /* end if */
diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c
index c76c3de..bb69798 100644
--- a/tools/lib/h5tools_filters.c
+++ b/tools/lib/h5tools_filters.c
@@ -15,6 +15,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "hdf5.h"
+#include "h5tools.h"
/*-------------------------------------------------------------------------
* print a warning message
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 0ed66b4..5398d76 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -43,7 +43,7 @@
/* Variable length string datatype */
#define STR_INIT_LEN 4096 /*initial length */
-static char *h5tools_escape(char *s, size_t size, int escape_spaces);
+static char *h5tools_escape(char *s, size_t size);
static hbool_t h5tools_is_zero(const void *_mem, size_t size);
/*-------------------------------------------------------------------------
@@ -753,7 +753,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
char enum_name[1024];
if (H5Tenum_nameof(type, vp, enum_name, sizeof enum_name) >= 0) {
- h5tools_str_append(str, h5tools_escape(enum_name, sizeof(enum_name), TRUE));
+ h5tools_str_append(str, h5tools_escape(enum_name, sizeof(enum_name)));
} else {
size_t i;
n = H5Tget_size(type);
@@ -939,8 +939,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
* Function: h5tools_escape
*
* Purpose: Changes all "funny" characters in S into standard C escape
- * sequences. If ESCAPE_SPACES is non-zero then spaces are
- * escaped by prepending a backslash.
+ * sequences.
*
* Return: Success: S
*
@@ -956,7 +955,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
*-------------------------------------------------------------------------
*/
static char *
-h5tools_escape(char *s/*in,out*/, size_t size, int escape_spaces)
+h5tools_escape(char *s/*in,out*/, size_t size)
{
register size_t i;
size_t n = strlen(s);