From 54f35626c14dd7f0bcd72bbe03d4e14bb3fc6bfc Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Mon, 10 Nov 2003 16:32:01 -0500 Subject: [svn-r7834] Purpose: code clean Description: removed compiler warnings on IRIX Solution: Platforms tested: linux solaris 2.7 IRIX Misc. update: --- tools/h5repack/h5repack.c | 4 ++-- tools/h5repack/h5repack_main.c | 5 +++-- tools/h5repack/h5repack_parse.c | 2 +- tools/h5repack/h5repack_parse.h | 2 +- tools/h5repack/test_h5repack_add.c | 2 +- tools/h5repack/test_h5repack_add.h | 2 +- tools/h5repack/test_h5repack_main.c | 5 +---- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 91f21dd..2678b20 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -248,7 +248,7 @@ void print_options(pack_opt_t *options) if (options->all_chunk==1) { printf("\tChunk all with dimension ["); for ( j = 0; j < options->chunk_g.rank; j++) - printf("%d ", options->chunk_g.chunk_lengths[j]); + printf("%d ",(int)options->chunk_g.chunk_lengths[j]); printf("]\n"); } }/* verbose */ @@ -262,7 +262,7 @@ void print_options(pack_opt_t *options) if (options->verbose){ printf("\t<%s> with chunk size ",obj_name); for ( k = 0; k < options->op_tbl->objs[i].chunk.rank; k++) - printf("%d ",options->op_tbl->objs[i].chunk.chunk_lengths[k]); + printf("%d ",(int)options->op_tbl->objs[i].chunk.chunk_lengths[k]); printf("\n"); } has_ck=1; diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 39f18f8..40f6f48 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -17,7 +17,7 @@ #include -static void usage(); +static void usage(void); /* @@ -108,9 +108,10 @@ int main(int argc, char **argv) */ static -void usage() +void usage(void) { + exit(1); } diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c index beaa9a6..5ac8bb8 100644 --- a/tools/h5repack/h5repack_parse.c +++ b/tools/h5repack/h5repack_parse.c @@ -208,7 +208,7 @@ obj_list_t* parse_comp(const char *str, *------------------------------------------------------------------------- */ -char* get_scomp(int code) +const char* get_scomp(int code) { if (code==H5Z_FILTER_NONE) return "NONE"; diff --git a/tools/h5repack/h5repack_parse.h b/tools/h5repack/h5repack_parse.h index 4a8616b..83b5a28 100644 --- a/tools/h5repack/h5repack_parse.h +++ b/tools/h5repack/h5repack_parse.h @@ -32,7 +32,7 @@ obj_list_t* parse_chunk (const char *str, int *n_objs, hsize_t *chunk_lengths, int *chunk_rank); -char* get_scomp (int code); +const char* get_scomp (int code); int parse_number(char *str); diff --git a/tools/h5repack/test_h5repack_add.c b/tools/h5repack/test_h5repack_add.c index dc3250f..95bb491 100644 --- a/tools/h5repack/test_h5repack_add.c +++ b/tools/h5repack/test_h5repack_add.c @@ -165,7 +165,7 @@ error: * *------------------------------------------------------------------------- */ -int make_dsets() +int make_dsets(void) { hid_t fid; /* file ID */ int nerrors=0; diff --git a/tools/h5repack/test_h5repack_add.h b/tools/h5repack/test_h5repack_add.h index e1d31c3..4d84ad7 100644 --- a/tools/h5repack/test_h5repack_add.h +++ b/tools/h5repack/test_h5repack_add.h @@ -26,7 +26,7 @@ extern "C" { #endif -int make_dsets(); +int make_dsets(void); #ifdef __cplusplus diff --git a/tools/h5repack/test_h5repack_main.c b/tools/h5repack/test_h5repack_main.c index 406c94f..7978da5 100644 --- a/tools/h5repack/test_h5repack_main.c +++ b/tools/h5repack/test_h5repack_main.c @@ -39,15 +39,12 @@ *------------------------------------------------------------------------- */ static int -test() +test(void) { pack_opt_t pack_options; diff_opt_t diff_options; memset(&diff_options, 0, sizeof (diff_opt_t)); - /* compare attributes in h5diff */ - diff_options.attr=1; - TESTING(" deflate filter"); if (h5repack_init (&pack_options, 0)<0) -- cgit v0.12