diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-12-06 21:51:26 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-12-06 21:51:26 (GMT) |
commit | 1fa6d7cbf7062f12bdd85f896d40004f562cc439 (patch) | |
tree | 78e24161dc9d3f3eedbb5ce4f4650df5039a3299 /tools/h5diff | |
parent | 405f1946d4c25179e10166b2134235bdeb13cf5e (diff) | |
download | hdf5-1fa6d7cbf7062f12bdd85f896d40004f562cc439.zip hdf5-1fa6d7cbf7062f12bdd85f896d40004f562cc439.tar.gz hdf5-1fa6d7cbf7062f12bdd85f896d40004f562cc439.tar.bz2 |
[svn-r13027]
fixed warning
../../../hdf5/tools/h5diff/h5diff_common.c: In function `usage':
../../../hdf5/tools/h5diff/h5diff_common.c:346: warning: function might be possible candidate for attribute `noreturn'
Diffstat (limited to 'tools/h5diff')
-rw-r--r-- | tools/h5diff/h5diff_common.c | 39 | ||||
-rw-r--r-- | tools/h5diff/h5diff_common.h | 2 |
2 files changed, 21 insertions, 20 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index fb121a3..fd261b1 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -25,8 +25,13 @@ *------------------------------------------------------------------------- */ -void parse_input(int argc, const char* argv[], const char** fname1, const char** fname2, - const char** objname1, const char** objname2, diff_opt_t* options) +void parse_input(int argc, + const char* argv[], + const char** fname1, + const char** fname2, + const char** objname1, + const char** objname2, + diff_opt_t* options) { int i; const char *s = NULL; @@ -40,12 +45,12 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** */ if ( argc==2 && (strcmp("-h",argv[1])==0) ) - usage(); + usage(1); if ( argc<3 ) { printf("Number of arguments is only %d\n", argc ); - usage(); + usage(1); } /*------------------------------------------------------------------------- @@ -71,10 +76,10 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** switch (*s) { default: printf("-%s is an invalid option\n", s ); - usage(); + usage(1); break; case 'h': - usage(); + usage(0); break; case 'v': options->m_verbose = 1; @@ -94,7 +99,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** if ( check_f_input(argv[i+1])==-1) { printf("<-d %s> is not a valid option\n", argv[i+1] ); - usage(); + usage(1); } options->delta = atof(argv[i+1]); i++; /* go to next */ @@ -102,7 +107,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** else { printf("Not a valid -d option\n"); - usage(); + usage(1); } break; case 'p': @@ -112,7 +117,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** if ( check_f_input(argv[i+1])==-1) { printf("<-p %s> is not a valid option\n", argv[i+1] ); - usage(); + usage(1); } options->percent = atof(argv[i+1]); i++; /* go to next */ @@ -120,7 +125,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** else { printf("Not a valid -p option\n"); - usage(); + usage(1); } break; case 'n': @@ -130,7 +135,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** if ( check_n_input(argv[i+1])==-1) { printf("<-n %s> is not a valid option\n", argv[i+1] ); - usage(); + usage(1); } options->count = atol(argv[i+1]); i++; /* go to next */ @@ -138,7 +143,7 @@ void parse_input(int argc, const char* argv[], const char** fname1, const char** else { printf("Not a valid -n option\n"); - usage(); + usage(1); } break; } /*switch*/ @@ -283,7 +288,7 @@ int check_f_input( const char *str ) * *------------------------------------------------------------------------- */ -void usage(void) +void usage(int status) { printf("usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] \n"); printf("\n"); @@ -337,12 +342,8 @@ void usage(void) printf("absolute path in both files. The compare criteria is: "); printf("1) datasets: numerical array differences 2) groups: name string difference "); printf("3) datatypes: the return value of H5Tequal 2) links: name string difference of the linked value\n"); -#ifdef H5_HAVE_PARALLEL - if(g_Parallel) - h5diff_exit(0); - else -#endif - exit(0); + + h5diff_exit(status); } /*------------------------------------------------------------------------- diff --git a/tools/h5diff/h5diff_common.h b/tools/h5diff/h5diff_common.h index 31b1b29..0faa6c7 100644 --- a/tools/h5diff/h5diff_common.h +++ b/tools/h5diff/h5diff_common.h @@ -15,7 +15,7 @@ extern unsigned char g_Parallel; extern int g_nTasks; -void usage(void); +void usage(int status); int check_n_input( const char* ); int check_f_input( const char* ); void parse_input(int argc, const char* argv[], const char** fname1, const char** fname2, const char** objname1, const char** objname2, diff_opt_t* options); |