diff options
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff.c | 2 | ||||
-rw-r--r-- | tools/lib/h5trav.c | 22 | ||||
-rw-r--r-- | tools/lib/h5trav.h | 22 | ||||
-rw-r--r-- | tools/lib/h5trav_table.c | 14 |
4 files changed, 30 insertions, 30 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 7907d38..bc0f7cc 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -382,7 +382,7 @@ hsize_t diff_match (hid_t file1_id, unsigned infile[2]; char c1, c2; hsize_t nfound = 0; - int i; + unsigned i; /*------------------------------------------------------------------------- * build the list diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index dc145ec..4ef495d 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -146,15 +146,15 @@ int h5trav_getindex( const char *obj, int nobjs, trav_info_t *info ) void h5trav_freeinfo( trav_info_t *info, int nobjs ) { int i; - if ( info ) - { - for ( i = 0; i < nobjs; i++) - { - if (info[i].name) - HDfree( info[i].name ); - } - HDfree(info); - } + if ( info ) + { + for ( i = 0; i < nobjs; i++) + { + if (info[i].name) + HDfree( info[i].name ); + } + HDfree(info); + } } @@ -625,7 +625,7 @@ void h5trav_printinfo(int nobjs, trav_info_t *travi) */ void h5trav_printtable(trav_table_t *table) { - int i, j; + unsigned int i, j; for ( i = 0; i < table->nobjs; i++) { @@ -678,7 +678,7 @@ int h5trav_getindext(const char *name, trav_table_t *table) { char *pdest; int result; - int i, j; + unsigned int i, j; for ( i = 0; i < table->nobjs; i++) { diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 40fa63d..4befcde 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -21,16 +21,16 @@ * public struct to store name and type of an object * the TYPE can be: * H5G_UNKNOWN = -1, - * H5G_GROUP, Object is a group - * H5G_DATASET, Object is a dataset - * H5G_TYPE, Object is a named data type - * H5G_LINK, Object is a symbolic link + * H5G_GROUP, Object is a group + * H5G_DATASET, Object is a dataset + * H5G_TYPE, Object is a named data type + * H5G_LINK, Object is a symbolic link *------------------------------------------------------------------------- */ typedef struct trav_info_t { - char *name; - H5G_obj_t type; + char *name; + H5G_obj_t type; } trav_info_t; @@ -39,7 +39,7 @@ typedef struct trav_info_t { *------------------------------------------------------------------------- */ typedef struct trav_link_t { - char *new_name; + char *new_name; } trav_link_t; @@ -56,7 +56,7 @@ typedef struct trav_obj_t { H5G_obj_t type; /* type of object */ trav_link_t *links; /* array of possible link names */ int sizelinks; /* size of links array */ - int nlinks; /* number of links */ + unsigned nlinks; /* number of links */ } trav_obj_t; @@ -66,9 +66,9 @@ typedef struct trav_obj_t { */ typedef struct trav_table_t { - int size; - int nobjs; - trav_obj_t *objs; + unsigned size; + unsigned nobjs; + trav_obj_t *objs; } trav_table_t; diff --git a/tools/lib/h5trav_table.c b/tools/lib/h5trav_table.c index 2ebcd6b..5fb8c75 100644 --- a/tools/lib/h5trav_table.c +++ b/tools/lib/h5trav_table.c @@ -32,7 +32,7 @@ int trav_table_search(haddr_t objno, trav_table_t *table ) { - int i; + unsigned int i; for (i = 0; i < table->nobjs; i++) if (table->objs[i].objno == objno) @@ -61,7 +61,7 @@ void trav_table_add(haddr_t objno, H5G_obj_t type, trav_table_t *table) { - int i; + unsigned int i; if (table->nobjs == table->size) { table->size *= 2; @@ -110,7 +110,7 @@ void trav_table_addflags(unsigned *flags, H5G_obj_t type, trav_table_t *table) { - int i; + unsigned int i; if (table->nobjs == table->size) { table->size *= 2; @@ -157,7 +157,7 @@ void trav_table_addflags(unsigned *flags, void trav_table_init( trav_table_t **tbl ) { - int i; + unsigned int i; trav_table_t* table = (trav_table_t*) HDmalloc(sizeof(trav_table_t)); table->size = 20; @@ -197,7 +197,7 @@ void trav_table_init( trav_table_t **tbl ) void trav_table_free( trav_table_t *table ) { - int i, j; + unsigned int i, j; for ( i = 0; i < table->nobjs; i++) { @@ -234,14 +234,14 @@ void trav_table_addlink(trav_table_t *table, int j /* the object index */, char *path ) { - int k; + unsigned int k; /* already inserted */ if (strcmp(table->objs[j].name,path)==0) return; /* allocate space if necessary */ - if (table->objs[j].nlinks == table->objs[j].sizelinks) { + if (table->objs[j].nlinks == (unsigned)table->objs[j].sizelinks) { table->objs[j].sizelinks += 2; table->objs[j].links = (trav_link_t*)HDrealloc(table->objs[j].links, |