diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-11 19:53:50 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-11 19:53:50 (GMT) |
commit | c46ac986c51aa94fd42af13da3519f41407f40b1 (patch) | |
tree | 518988dd618cea6fa4fa4acd960cb4be3d096432 /tools/h5dump | |
parent | bea931d73cb9db08ac220393c2cb59dd6326a8ef (diff) | |
download | hdf5-c46ac986c51aa94fd42af13da3519f41407f40b1.zip hdf5-c46ac986c51aa94fd42af13da3519f41407f40b1.tar.gz hdf5-c46ac986c51aa94fd42af13da3519f41407f40b1.tar.bz2 |
[svn-r3984] Purpose:
Code cleanups
Description:
Fixed a small number of warnings.
Platforms tested:
FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 32 | ||||
-rw-r--r-- | tools/h5dump/h5dumptst.c | 18 |
2 files changed, 25 insertions, 25 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 0b4b49e..5eb2a7f 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -2157,21 +2157,21 @@ handle_datasets(hid_t fid, char *dset, void *data) H5Gget_objinfo(dsetid, ".", TRUE, &statbuf); if (statbuf.nlink > 1) { - int index = search_obj(dset_table, statbuf.objno); + int idx = search_obj(dset_table, statbuf.objno); - if (index >= 0) { - if (dset_table->objs[index].displayed) { + if (idx >= 0) { + if (dset_table->objs[idx].displayed) { begin_obj(dump_header_format->datasetbegin, dset, dump_header_format->datasetblockbegin); indentation(indent + COL); printf("%s \"%s\"\n", HARDLINK, - dset_table->objs[index].objname); + dset_table->objs[idx].objname); indentation(indent); end_obj(dump_header_format->datasetend, dump_header_format->datasetblockend); } else { - strcpy(dset_table->objs[index].objname, dset); - dset_table->objs[index].displayed = 1; + strcpy(dset_table->objs[idx].objname, dset); + dset_table->objs[idx].displayed = 1; dump_dataset(dsetid, dset, sset); } } else { @@ -2300,29 +2300,29 @@ handle_datatypes(hid_t fid, char *type, void UNUSED *data) if ((typeid = H5Topen(fid, type)) < 0) { /* check if type is unamed data type */ - int index = 0; + int idx = 0; - while (index < type_table->nobjs ) { + while (idx < type_table->nobjs ) { char name[128], name1[128]; - if (!type_table->objs[index].recorded) { + if (!type_table->objs[idx].recorded) { /* unamed data type */ sprintf(name, "#%lu:%lu\n", - type_table->objs[index].objno[0], - type_table->objs[index].objno[1]); + type_table->objs[idx].objno[0], + type_table->objs[idx].objno[1]); sprintf(name1, "/#%lu:%lu\n", - type_table->objs[index].objno[0], - type_table->objs[index].objno[1]); + type_table->objs[idx].objno[0], + type_table->objs[idx].objno[1]); if (!strncmp(name, type, strlen(type)) || !strncmp(name1, type, strlen(type))) break; } - index++; + idx++; } - if (index == type_table->nobjs) { + if (idx == type_table->nobjs) { /* unknown type */ begin_obj(dump_header_format->datatypebegin, type, dump_header_format->datatypeblockbegin); @@ -2332,7 +2332,7 @@ handle_datatypes(hid_t fid, char *type, void UNUSED *data) dump_header_format->datatypeblockend); d_status = EXIT_FAILURE; } else { - hid_t dsetid = H5Dopen(fid, type_table->objs[index].objname); + hid_t dsetid = H5Dopen(fid, type_table->objs[idx].objname); typeid = H5Dget_type(dsetid); dump_named_datatype(typeid, type); H5Tclose(typeid); diff --git a/tools/h5dump/h5dumptst.c b/tools/h5dump/h5dumptst.c index 01438d7..bdb394b 100644 --- a/tools/h5dump/h5dumptst.c +++ b/tools/h5dump/h5dumptst.c @@ -927,7 +927,7 @@ static void test_many(void) { dset1_t dset1[6]; hsize_t dim[4]; - int index[4] = {0,1,2,3}; /* normal indicies */ + int idx[4] = {0,1,2,3}; /* normal indicies */ const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */ fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -1005,20 +1005,20 @@ static void test_many(void) { for (j=0; j<(int)sdim; j++) { for (i3 = 0; i3 < 2; i3++) { - index[perm[3]] = i3; + idx[perm[3]] = i3; for (i2 = 0; i2 < 2; i2++) { - index[perm[2]] = i2; + idx[perm[2]] = i2; for (i1 = 0; i1 < 2; i1++) { - index[perm[1]] = i1; + idx[perm[1]] = i1; for (i0 = 0; i0 < 2; i0++) { - index[perm[0]] = i0; + idx[perm[0]] = i0; - dset1[j].a[index[3]][index[2]][index[1]][index[0]] = i0+j; - dset1[j].b[index[3]][index[2]][index[1]][index[0]] = (double)(i0+j); + dset1[j].a[idx[3]][idx[2]][idx[1]][idx[0]] = i0+j; + dset1[j].b[idx[3]][idx[2]][idx[1]][idx[0]] = (double)(i0+j); #if WIN32 - dset1[j].c[index[3]][index[2]][index[1]][index[0]] = (double)(i0+j+(signed __int64)sdim); + dset1[j].c[idx[3]][idx[2]][idx[1]][idx[0]] = (double)(i0+j+(signed __int64)sdim); #else - dset1[j].c[index[3]][index[2]][index[1]][index[0]] = (double)(i0+j+sdim); + dset1[j].c[idx[3]][idx[2]][idx[1]][idx[0]] = (double)(i0+j+sdim); #endif } } |