summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-10 19:00:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-10 19:00:39 (GMT)
commitb4ff3e6e79a46fb474eb1786a11a7d2451455111 (patch)
treeb73756af2d3eaee487c4087d55fbb04e1eba62b5 /tools/h5diff
parentda5058310c324dcce93dc9328ef2bd53bf1fed02 (diff)
downloadhdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.zip
hdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.tar.gz
hdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.tar.bz2
[svn-r16560] Description:
Remove another call to H5E_clear_stack() from within the library. Clean up lots of compiler warnings. Tested on: Mac OS X/32 10.5.6 (amazon) (followup on other platforms forthcoming)
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/h5diff_common.c15
-rw-r--r--tools/h5diff/h5diffgentest.c14
-rw-r--r--tools/h5diff/ph5diff_main.c10
3 files changed, 24 insertions, 15 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index 547d910..8e7b181 100644
--- a/tools/h5diff/h5diff_common.c
+++ b/tools/h5diff/h5diff_common.c
@@ -19,9 +19,9 @@
#include "h5diff_common.h"
#include "h5tools_utils.h"
-int check_n_input( const char* );
-int check_p_input( const char* );
-int check_d_input( const char* );
+static int check_n_input( const char* );
+static int check_p_input( const char* );
+static int check_d_input( const char* );
/* module-scoped variables */
@@ -228,7 +228,8 @@ void parse_command_line(int argc,
*
*-------------------------------------------------------------------------
*/
-int check_n_input( const char *str )
+static int
+check_n_input( const char *str )
{
unsigned i;
char c;
@@ -263,7 +264,8 @@ int check_n_input( const char *str )
*
*-------------------------------------------------------------------------
*/
-int check_p_input( const char *str )
+static int
+check_p_input( const char *str )
{
double x;
@@ -296,7 +298,8 @@ int check_p_input( const char *str )
*
*-------------------------------------------------------------------------
*/
-int check_d_input( const char *str )
+static int
+check_d_input( const char *str )
{
double x;
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index d9495e5..181e242 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -55,7 +55,7 @@ return -1;
}
const H5L_class_t UD_link_class[1] = {{
H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
- MY_LINKCLASS, /* Link type id number */
+ (H5L_type_t)MY_LINKCLASS, /* Link type id number */
"UD link class", /* name for debugging */
NULL, /* Creation callback */
NULL, /* Move/rename callback */
@@ -492,7 +492,7 @@ int test_types(const char *fname)
*/
H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT);
H5Lregister(UD_link_class);
- H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, (size_t)0, H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_ud(fid1, "ud_link", (H5L_type_t)MY_LINKCLASS, NULL, (size_t)0, H5P_DEFAULT, H5P_DEFAULT);
/*-------------------------------------------------------------------------
* Close
@@ -2608,6 +2608,7 @@ void gen_datareg(hid_t fid,
sid1 = H5Screate_simple(2, dims1, NULL);
did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ assert(status >= 0);
/* create the reference dataset */
sid2 = H5Screate_simple(1, dims2, NULL);
@@ -2624,10 +2625,12 @@ void gen_datareg(hid_t fid,
}
status = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL);
+ assert(status >= 0);
H5Sget_select_npoints(sid1);
/* store first dataset region */
status = H5Rcreate(&rbuf[0], fid, "dsetref", H5R_DATASET_REGION, sid1);
+ assert(status >= 0);
/* select sequence of five points for second reference */
coord[0][0]=6; coord[0][1]=9;
@@ -2649,15 +2652,20 @@ void gen_datareg(hid_t fid,
/* write */
status = H5Dwrite(did2,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf);
+ assert(status >= 0);
/* close, free memory buffers */
status = H5Dclose(did1);
+ assert(status >= 0);
status = H5Sclose(sid1);
+ assert(status >= 0);
status = H5Dclose(did2);
+ assert(status >= 0);
status = H5Sclose(sid2);
+ assert(status >= 0);
+
free(rbuf);
free(buf);
-
}
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index a4ac793..c613879 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -16,6 +16,7 @@
#include "h5diff.h"
#include "ph5diff.h"
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include "h5diff_common.h"
@@ -59,7 +60,6 @@ int main(int argc, const char *argv[])
const char *fname2 = NULL;
const char *objname1 = NULL;
const char *objname2 = NULL;
- hsize_t nfound=0;
diff_opt_t options;
outBuffOffset = 0;
@@ -78,7 +78,7 @@ int main(int argc, const char *argv[])
parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options);
- nfound = h5diff(fname1, fname2, objname1, objname2, &options);
+ h5diff(fname1, fname2, objname1, objname2, &options);
print_info(&options);
@@ -92,7 +92,7 @@ int main(int argc, const char *argv[])
{
parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options);
- nfound = h5diff(fname1, fname2, objname1, objname2, &options);
+ h5diff(fname1, fname2, objname1, objname2, &options);
MPI_Barrier(MPI_COMM_WORLD);
@@ -131,7 +131,6 @@ ph5diff_worker(int nID)
hid_t file1_id, file2_id;
char filenames[2][1024];
char out_data[PRINT_DATA_MAX_SIZE] = {0};
- hsize_t nfound=0;
struct diffs_found diffs;
int i;
MPI_Status Status;
@@ -170,8 +169,7 @@ ph5diff_worker(int nID)
/*Recv parameters for diff from manager task */
MPI_Recv(&args, sizeof(args), MPI_BYTE, 0, MPI_TAG_ARGS, MPI_COMM_WORLD, &Status);
/*Do the diff */
- nfound = diff(file1_id, args.name, file2_id, args.name, &(args.options), args.type);
- diffs.nfound = nfound;
+ diffs.nfound = diff(file1_id, args.name, file2_id, args.name, &(args.options), args.type);
diffs.not_cmp = args.options.not_cmp;
/*If print buffer has something in it, request print token.*/