diff options
Diffstat (limited to 'hl')
-rw-r--r-- | hl/c++/test/ptableTest.cpp | 2 | ||||
-rw-r--r-- | hl/test/test_file_image.c | 2 | ||||
-rw-r--r-- | hl/test/test_ld.c | 5 | ||||
-rw-r--r-- | hl/test/test_lite.c | 34 | ||||
-rw-r--r-- | hl/tools/gif2h5/gif.h | 6 | ||||
-rw-r--r-- | hl/tools/gif2h5/gifread.c | 4 | ||||
-rw-r--r-- | hl/tools/gif2h5/hdfgifwr.c | 4 | ||||
-rw-r--r-- | hl/tools/h5watch/h5watch.c | 4 |
8 files changed, 32 insertions, 29 deletions
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp index bf60402..8e71557 100644 --- a/hl/c++/test/ptableTest.cpp +++ b/hl/c++/test/ptableTest.cpp @@ -690,7 +690,7 @@ TestHDFFV_9758() if (s2.a != s1[i].a || s2.e != s1[i].e) goto error; - else if (HDstrcmp(s2.d, s1[i].d)) + else if (HDstrcmp(s2.d, s1[i].d) != 0) goto error; } } // end of ptable block diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c index c20112f..f820568 100644 --- a/hl/test/test_file_image.c +++ b/hl/test/test_file_image.c @@ -51,7 +51,7 @@ *------------------------------------------------------------------------- */ static int -test_file_image(size_t open_images, size_t nflags, unsigned *flags) +test_file_image(size_t open_images, size_t nflags, const unsigned *flags) { hid_t * file_id, *dset_id, file_space, plist; /* HDF5 ids */ hsize_t dims1[RANK] = {2, 3}; /* original dimension of datasets */ diff --git a/hl/test/test_ld.c b/hl/test/test_ld.c index 06cb600..02a56f4 100644 --- a/hl/test/test_ld.c +++ b/hl/test/test_ld.c @@ -157,7 +157,8 @@ static herr_t test_LD_elmts_invalid(const char *file); static herr_t test_LD_elmts_one(const char *file, const char *dname, const char *fields); static herr_t test_LD_elmts_two(const char *file, const char *dname, const char *fields); -static herr_t verify_elmts_two(int type, hsize_t *ext_dims, hsize_t *prev_dims, void *_ldbuf, void *_buf); +static herr_t verify_elmts_two(int type, const hsize_t *ext_dims, const hsize_t *prev_dims, void *_ldbuf, + void *_buf); /* data structures for compound data type */ typedef struct sub22_t { @@ -1135,7 +1136,7 @@ error: ************************************************************************************** */ static herr_t -verify_elmts_two(int type, hsize_t *ext_dims, hsize_t *prev_dims, void *_ldbuf, void *_buf) +verify_elmts_two(int type, const hsize_t *ext_dims, const hsize_t *prev_dims, void *_ldbuf, void *_buf) { int k, m; /* Local index variable */ diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 52cda54..cae91ff 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1054,7 +1054,7 @@ test_integers(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_STD_I8BE")) { + if (HDstrcmp(dt_str, "H5T_STD_I8BE") != 0) { HDfree(dt_str); goto out; } @@ -1112,7 +1112,7 @@ test_fps(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_IEEE_F32BE")) { + if (HDstrcmp(dt_str, "H5T_IEEE_F32BE") != 0) { HDfree(dt_str); goto out; } @@ -1184,7 +1184,7 @@ test_strings(void) goto out; } if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET " - "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) { + "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1219,7 +1219,7 @@ test_strings(void) goto out; } if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n " - "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) { + "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1238,7 +1238,7 @@ test_strings(void) if (HDstrncmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET " "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }", - str_len - 1)) { + str_len - 1) != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1261,7 +1261,7 @@ test_strings(void) if (HDstrncmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET " "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }", - str_len)) { + str_len) != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1322,7 +1322,8 @@ test_opaques(void) } if (HDstrcmp( dt_str, - "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }")) { + "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") != + 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1376,7 +1377,7 @@ test_enums(void) if (H5Tenum_nameof(dtype, &value1, name1, size) < 0) goto out; - if (HDstrcmp(name1, "BLUE")) + if (HDstrcmp(name1, "BLUE") != 0) goto out; if (H5Tenum_valueof(dtype, name2, &value2) < 0) @@ -1399,8 +1400,9 @@ test_enums(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" " - " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }")) { + if (HDstrcmp(dt_str, + "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" " + " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); @@ -1462,7 +1464,7 @@ test_variables(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }")) { + if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1526,7 +1528,7 @@ test_arrays(void) } if (HDstrcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n " " H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE " - "\"arr_compound_2\" : 1;\n }\n }\n }")) { + "\"arr_compound_2\" : 1;\n }\n }\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1586,7 +1588,7 @@ test_compounds(void) goto out; } if (HDstrcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE " - "\"two_field\" : 6;\n }")) { + "\"two_field\" : 6;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1605,7 +1607,7 @@ test_compounds(void) if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL) goto out; - if (HDstrcmp(memb_name, "i16_field")) { + if (HDstrcmp(memb_name, "i16_field") != 0) { H5free_memory(memb_name); goto out; } @@ -1683,7 +1685,7 @@ test_compound_bug(void) if ((memb_name = H5Tget_member_name(dtype, 2)) == NULL) goto out; - if (HDstrcmp(memb_name, "sub")) { + if (HDstrcmp(memb_name, "sub") != 0) { H5free_memory(memb_name); goto out; } @@ -1720,7 +1722,7 @@ test_compound_bug(void) if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL) goto out; if (HDstrcmp(memb_name, "desc____________________________________________________________________________" - "_____________")) { + "_____________") != 0) { H5free_memory(memb_name); goto out; } diff --git a/hl/tools/gif2h5/gif.h b/hl/tools/gif2h5/gif.h index 2b4a344..1a8cfe4 100644 --- a/hl/tools/gif2h5/gif.h +++ b/hl/tools/gif2h5/gif.h @@ -157,8 +157,8 @@ int ReadGifApplication(GIFAPPLICATION *, GIFBYTE **); int ReadGifComment(GIFCOMMENT *, GIFBYTE **); /* HDFGIFWR.C */ -int hdfWriteGIF(FILE *fp, GIFBYTE *pic, int ptype, int w, int h, GIFBYTE *rmap, GIFBYTE *gmap, GIFBYTE *bmap, - GIFBYTE *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel); +int hdfWriteGIF(FILE *fp, GIFBYTE *pic, int ptype, int w, int h, const GIFBYTE *rmap, const GIFBYTE *gmap, + const GIFBYTE *bmap, const GIFBYTE *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel); /* WRITEHDF.C */ int WriteHDF(GIFTOMEM, GIFCHAR *); @@ -176,7 +176,7 @@ int ReadHDF(GIFBYTE **data, GIFBYTE palette[256][3], hsize_t *image_size, GIFCHA GIFCHAR *dset_name, GIFCHAR *pal_name); GIFBYTE *Decompress(GIFIMAGEDESC *, GIFHEAD *); -GIFBYTE GetByte(GIFBYTE *); +GIFBYTE GetByte(const GIFBYTE *); GIFWORD GetWord(GIFBYTE *); void cleanup(GIFBYTE *); diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c index b88264b..d2afbc4 100644 --- a/hl/tools/gif2h5/gifread.c +++ b/hl/tools/gif2h5/gifread.c @@ -38,7 +38,7 @@ GetWord(GIFBYTE *MemGif) } GIFBYTE -GetByte(GIFBYTE *MemGif) { return *MemGif; } +GetByte(const GIFBYTE *MemGif) { return *MemGif; } /* * Read a GIF image GIFBYTE Header. @@ -62,7 +62,7 @@ ReadGifHeader(GIFHEAD * GifHead, /* Pointer to GIF header structure */ GifHead->HeaderDump[i] = *(*MemGif2)++; } - if (strncmp((const char *)GifHead->HeaderDump, "GIF", (size_t)3)) { + if (strncmp((const char *)GifHead->HeaderDump, "GIF", (size_t)3) != 0) { printf("The file does not appear to be a valid GIF file.\n"); exit(EXIT_FAILURE); } diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 8068829..21b14d1 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -135,8 +135,8 @@ static int EOFCode; /*************************************************************/ int -hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap, byte *bmap, byte *pc2ncmap, - int numcols, int colorstyle, int BitsPerPixel) +hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, const byte *rmap, const byte *gmap, + const byte *bmap, const byte *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel) { int InitCodeSize; int i; diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index 8d7f4ec..a5e82ca 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -43,7 +43,7 @@ static unsigned g_retry = DEFAULT_RETRY; /* # of times to try opening the file static hbool_t g_display_hex = FALSE; /* display data in hexadecimal format : LATER */ static hbool_t g_user_interrupt = FALSE; /* Flag to indicate that user interrupted execution */ -static herr_t doprint(hid_t did, hsize_t *start, hsize_t *block, int rank); +static herr_t doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank); static herr_t slicendump(hid_t did, hsize_t *prev_dims, hsize_t *cur_dims, hsize_t *start, hsize_t *block, int rank, int subrank); static herr_t monitor_dataset(hid_t fid, char *dsetname); @@ -95,7 +95,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no *------------------------------------------------------------------------- */ static herr_t -doprint(hid_t did, hsize_t *start, hsize_t *block, int rank) +doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank) { h5tools_context_t ctx; /* print context */ h5tool_format_t info; /* Format info for the tools library */ |