summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:36 (GMT)
commitd09b08ce39f96d70f1d68a9f2e0313495c784619 (patch)
tree63ba039519b469adb1fffd30261079ae0dcf93f1 /tools
parent0343b61666f105ca865dcbc0cbcff87f43f5e489 (diff)
downloadhdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.zip
hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.gz
hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.bz2
[svn-r8384] 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/h5diff.c389
-rw-r--r--tools/h5diff/h5difftst.c1
-rw-r--r--tools/h5dump/h5dump.c67
-rwxr-xr-xtools/h5import/h5import.c14
-rw-r--r--tools/h5ls/h5ls.c2
-rw-r--r--tools/lib/h5tools_str.c9
6 files changed, 232 insertions, 250 deletions
diff --git a/tools/h5diff/h5diff.c b/tools/h5diff/h5diff.c
index 71c66ff..eb8debe 100644
--- a/tools/h5diff/h5diff.c
+++ b/tools/h5diff/h5diff.c
@@ -16,7 +16,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#include <assert.h>
#include "hdf5.h"
#include "h5trav.h"
#include "H5private.h"
@@ -63,18 +62,18 @@ options_t options = {0,0,0,0,0,0,0};
*/
static int diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name,
- const char *obj2_name, options_t options );
+ const char *obj2_name, options_t opts );
static int diff( hid_t file1_id, const char *obj1_name, hid_t file2_id, const char *obj2_name,
- options_t options, int type );
+ options_t opts, int type );
static int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
int nobjects1, info_t *info1,
hid_t file2_id, const char *file2_name, const char *obj2_name,
int nobjects2, info_t *info2,
- options_t options );
+ options_t opts );
static int match( hid_t file1_id, int nobjects1, info_t *info1,
- hid_t file2_id, int nobjects2, info_t *info2, options_t options );
+ hid_t file2_id, int nobjects2, info_t *info2, options_t opts );
static int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims,
- options_t options, const char *obj1, const char *obj2,
+ options_t opts, const char *obj1, const char *obj2,
hid_t m_type );
/*-------------------------------------------------------------------------
@@ -576,7 +575,7 @@ int compare_object( char *obj1, char *obj2 )
*/
static
int match( hid_t file1_id, int nobjects1, info_t *info1,
- hid_t file2_id, int nobjects2, info_t *info2, options_t options )
+ hid_t file2_id, int nobjects2, info_t *info2, options_t opts )
{
int cmp;
int more_names_exist = (nobjects1>0 && nobjects2>0) ? 1 : 0;
@@ -673,7 +672,7 @@ int match( hid_t file1_id, int nobjects1, info_t *info1,
if ( table->objs[i].objno[0]==1 && table->objs[i].objno[1]==1 )
nfound+=diff( file1_id, table->objs[i].objname,
file2_id, table->objs[i].objname,
- options, table->objs[i].type );
+ opts, table->objs[i].type );
}
/* free table */
@@ -745,7 +744,7 @@ int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
int nobjects1, info_t *info1,
hid_t file2_id, const char *file2_name, const char *obj2_name,
int nobjects2, info_t *info2,
- options_t options )
+ options_t opts )
{
int f1=0, f2=0;
@@ -781,7 +780,7 @@ int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
return 0;
}
- nfound=diff( file1_id, obj1_name, file2_id, obj2_name, options, info1[i].type );
+ nfound=diff( file1_id, obj1_name, file2_id, obj2_name, opts, info1[i].type );
return nfound;
}
@@ -807,14 +806,14 @@ int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
static
int diff( hid_t file1_id, const char *obj1_name, hid_t file2_id, const char *obj2_name,
- options_t options, int type )
+ options_t opts, int type )
{
int nfound=0;
switch ( type )
{
case H5G_DATASET:
- nfound=diff_dataset(file1_id,file2_id,obj1_name,obj2_name,options);
+ nfound=diff_dataset(file1_id,file2_id,obj1_name,obj2_name,opts);
break;
default:
@@ -849,7 +848,7 @@ int diff( hid_t file1_id, const char *obj1_name, hid_t file2_id, const char *obj
*/
static
int diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name,
- const char *obj2_name, options_t options )
+ const char *obj2_name, options_t opts )
{
void *edata;
hid_t (*func)(void*);
@@ -1189,7 +1188,7 @@ int diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name,
printf( "Comparing <%s> with <%s>\n", obj1_name, obj2_name );
name1=h5diff_basename(obj1_name);
name2=h5diff_basename(obj2_name);
- nfound = array_diff(buf1,buf2,tot_cnt1,rank1,dims1,options,name1,name2,m_type1);
+ nfound = array_diff(buf1,buf2,tot_cnt1,rank1,dims1,opts,name1,name2,m_type1);
printf("%d differences found\n", nfound );
/*-------------------------------------------------------------------------
@@ -1238,7 +1237,7 @@ out:
*/
static
int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims,
- options_t options, const char *obj1, const char *obj2,
+ options_t opts, const char *obj1, const char *obj2,
hid_t m_type )
{
char fmt_llong[255], fmt_ullong[255];
@@ -1288,13 +1287,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_char, _buf1, sizeof(char));
memcpy(&temp2_char, _buf2, sizeof(char));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_char-temp2_char) > options.delta)
+ if (abs(temp1_char-temp2_char) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1304,13 +1303,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > options.percent )
+ if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1321,14 +1320,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > options.percent &&
- abs(temp1_char-temp2_char) > options.delta )
+ if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > opts.percent &&
+ abs(temp1_char-temp2_char) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1340,9 +1339,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_char != temp2_char)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1372,13 +1371,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_uchar, _buf1, sizeof(unsigned char));
memcpy(&temp2_uchar, _buf2, sizeof(unsigned char));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_uchar-temp2_uchar) > options.delta)
+ if (abs(temp1_uchar-temp2_uchar) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1388,13 +1387,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options.percent )
+ if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1405,14 +1404,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options.percent &&
- abs(temp1_uchar-temp2_uchar) > options.delta )
+ if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > opts.percent &&
+ abs(temp1_uchar-temp2_uchar) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1424,9 +1423,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_uchar != temp2_uchar)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1457,13 +1456,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_short, _buf1, sizeof(short));
memcpy(&temp2_short, _buf2, sizeof(short));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_short-temp2_short) > options.delta)
+ if (abs(temp1_short-temp2_short) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1473,13 +1472,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > options.percent )
+ if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1490,14 +1489,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > options.percent &&
- abs(temp1_short-temp2_short) > options.delta )
+ if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > opts.percent &&
+ abs(temp1_short-temp2_short) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1509,9 +1508,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_short != temp2_short)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1541,13 +1540,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_ushort, _buf1, sizeof(unsigned short));
memcpy(&temp2_ushort, _buf2, sizeof(unsigned short));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_ushort-temp2_ushort) > options.delta)
+ if (abs(temp1_ushort-temp2_ushort) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1557,13 +1556,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > options.percent )
+ if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1574,14 +1573,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > options.percent &&
- abs(temp1_ushort-temp2_ushort) > options.delta )
+ if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > opts.percent &&
+ abs(temp1_ushort-temp2_ushort) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1593,9 +1592,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_ushort != temp2_ushort)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1626,13 +1625,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_int, _buf1, sizeof(int));
memcpy(&temp2_int, _buf2, sizeof(int));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_int-temp2_int) > options.delta)
+ if (abs(temp1_int-temp2_int) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1642,13 +1641,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > options.percent )
+ if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1659,14 +1658,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > options.percent &&
- abs(temp1_int-temp2_int) > options.delta )
+ if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > opts.percent &&
+ abs(temp1_int-temp2_int) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1678,9 +1677,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_int != temp2_int)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1711,13 +1710,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_uint, _buf1, sizeof(unsigned int));
memcpy(&temp2_uint, _buf2, sizeof(unsigned int));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs((int)(temp1_uint-temp2_uint)) > options.delta)
+ if (abs((int)(temp1_uint-temp2_uint)) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1727,13 +1726,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > options.percent )
+ if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1744,14 +1743,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > options.percent &&
- abs((int)(temp1_uint-temp2_uint)) > options.delta )
+ if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > opts.percent &&
+ abs((int)(temp1_uint-temp2_uint)) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1763,9 +1762,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_uint != temp2_uint)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1796,13 +1795,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_long, _buf1, sizeof(long));
memcpy(&temp2_long, _buf2, sizeof(long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs(temp1_long-temp2_long) > (long)options.delta)
+ if (labs(temp1_long-temp2_long) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1812,13 +1811,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)options.percent )
+ if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1829,14 +1828,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)options.percent &&
- labs(temp1_long-temp2_long) > (long)options.delta )
+ if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)opts.percent &&
+ labs(temp1_long-temp2_long) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1848,9 +1847,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_long != temp2_long)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1880,13 +1879,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_ulong, _buf1, sizeof(unsigned long));
memcpy(&temp2_ulong, _buf2, sizeof(unsigned long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs((long)(temp1_ulong-temp2_ulong)) > (long)options.delta)
+ if (labs((long)(temp1_ulong-temp2_ulong)) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1896,13 +1895,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)options.percent )
+ if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1913,14 +1912,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)options.percent &&
- labs((long)(temp1_ulong-temp2_ulong)) > (long)options.delta )
+ if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)opts.percent &&
+ labs((long)(temp1_ulong-temp2_ulong)) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1932,9 +1931,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_ulong != temp2_ulong)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1964,13 +1963,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_llong, _buf1, sizeof(long_long));
memcpy(&temp2_llong, _buf2, sizeof(long_long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs((long)(temp1_llong-temp2_llong)) > (long)options.delta)
+ if (labs((long)(temp1_llong-temp2_llong)) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1980,13 +1979,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)options.percent )
+ if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1997,14 +1996,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)options.percent &&
- labs((long)(temp1_llong-temp2_llong)) > (long)options.delta )
+ if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)opts.percent &&
+ labs((long)(temp1_llong-temp2_llong)) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2016,9 +2015,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_llong != temp2_llong)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2048,13 +2047,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_ullong, _buf1, sizeof(unsigned long_long));
memcpy(&temp2_ullong, _buf2, sizeof(unsigned long_long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs((long)(temp1_ullong-temp2_ullong)) > (long)options.delta)
+ if (labs((long)(temp1_ullong-temp2_ullong)) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2065,13 +2064,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)options.percent )
+ if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2083,14 +2082,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)options.percent &&
- labs((long)(temp1_ullong-temp2_ullong)) > (long)options.delta )
+ if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)opts.percent &&
+ labs((long)(temp1_ullong-temp2_ullong)) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2103,9 +2102,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_ullong != temp2_ullong)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2136,13 +2135,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_float, _buf1, sizeof(float));
memcpy(&temp2_float, _buf2, sizeof(float));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (fabs(temp1_float-temp2_float) > options.delta)
+ if (fabs(temp1_float-temp2_float) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2152,13 +2151,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > options.percent )
+ if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2169,14 +2168,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > options.percent &&
- fabs(temp1_float-temp2_float) > options.delta )
+ if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > opts.percent &&
+ fabs(temp1_float-temp2_float) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2188,9 +2187,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_float != temp2_float)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2220,13 +2219,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_double, _buf1, sizeof(double));
memcpy(&temp2_double, _buf2, sizeof(double));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (fabs(temp1_double-temp2_double) > options.delta)
+ if (fabs(temp1_double-temp2_double) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2236,13 +2235,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > options.percent )
+ if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2253,14 +2252,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > options.percent &&
- fabs(temp1_double-temp2_double) > options.delta )
+ if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > opts.percent &&
+ fabs(temp1_double-temp2_double) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2272,9 +2271,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_double != temp2_double)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
diff --git a/tools/h5diff/h5difftst.c b/tools/h5diff/h5difftst.c
index 783eb42..e270171 100644
--- a/tools/h5diff/h5difftst.c
+++ b/tools/h5diff/h5difftst.c
@@ -14,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <assert.h>
#include "hdf5.h"
#include "H5private.h"
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 21913cd..601b3bd 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -70,7 +70,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 struct 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);
@@ -1425,7 +1427,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;
@@ -1437,8 +1438,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\" "
@@ -1449,7 +1450,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);
@@ -3743,9 +3744,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[i].objname,dtxid,100,1);
+ xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1);
if (!type_table->objs[i].recorded) {
/* 'anonymous' NDT. Use it's object num.
as it's name. */
@@ -4111,9 +4111,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
@@ -4457,7 +4456,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;
@@ -4476,8 +4474,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.
@@ -4583,20 +4581,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(),
@@ -4611,8 +4608,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,
@@ -4623,19 +4620,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);
@@ -4682,19 +4678,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,
@@ -4864,7 +4859,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;
@@ -4967,6 +4962,7 @@ xml_print_strs(hid_t did, int source)
*
*-------------------------------------------------------------------------
*/
+#ifdef LATER
static void
check_compression(hid_t dcpl)
{
@@ -4997,6 +4993,8 @@ check_compression(hid_t dcpl)
}
}
}
+#endif /* LATER */
+
/*-------------------------------------------------------------------------
* Function: check_filters
*
@@ -5095,8 +5093,8 @@ check_filters(hid_t dcpl)
static void xml_dump_fill_value(hid_t dcpl, hid_t type)
{
-int sz;
-int i;
+size_t sz;
+size_t i;
hsize_t space;
void * buf;
char * path;
@@ -5160,6 +5158,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);
@@ -5230,7 +5229,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;
@@ -5238,7 +5236,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;
@@ -5255,8 +5252,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 : "/");
@@ -5341,7 +5338,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:
@@ -5358,7 +5355,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:
@@ -5382,7 +5379,7 @@ 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) {
indentation(indent + COL);
printf("<%sNoFill/>\n",xmlnsprefix);
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 20dc785..28020d5 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 aeb4594..58fb782 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1755,7 +1755,7 @@ list (hid_t group, const char *name, void *_iter)
return 0;
} else if (sb.type<0 || sb.type>=H5G_NTYPES) {
printf("Unknown type(%d)", sb.type);
- sb.type = -1;
+ sb.type = H5G_UNKNOWN;
}
if (sb.type>=0 && dispatch_g[sb.type].name) {
fputs(dispatch_g[sb.type].name, stdout);
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 1053b60..970a46b 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);
/*-------------------------------------------------------------------------
@@ -751,7 +751,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);
@@ -940,8 +940,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
*
@@ -957,7 +956,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);