diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/cmpd_dset.c | 10 | ||||
-rw-r--r-- | test/dt_arith.c | 50 | ||||
-rw-r--r-- | test/dtypes.c | 101 | ||||
-rw-r--r-- | test/links.c | 198 | ||||
-rw-r--r-- | test/objcopy.c | 12 | ||||
-rw-r--r-- | test/tarray.c | 2 | ||||
-rw-r--r-- | test/tchecksum.c | 2 | ||||
-rw-r--r-- | test/tconfig.c | 6 | ||||
-rw-r--r-- | test/tmeta.c | 2 | ||||
-rw-r--r-- | test/tsohm.c | 9 | ||||
-rw-r--r-- | test/tvlstr.c | 2 | ||||
-rw-r--r-- | test/tvltypes.c | 2 | ||||
-rw-r--r-- | test/vds.c | 5 | ||||
-rw-r--r-- | test/vds_env.c | 5 |
14 files changed, 209 insertions, 197 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 1944ce1..22950e9 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -910,7 +910,7 @@ initialize_stype1(unsigned char *buf, size_t num) stype1 *s_ptr; for(i = 0; i < (int)num; i++) { - s_ptr = (stype1 *)buf + i; + s_ptr = (stype1 *)((void *)buf) + i; s_ptr->a = i * 8 + 0; s_ptr->b = i * 8 + 1; for(j = 0; j < 8; j++) @@ -953,7 +953,7 @@ initialize_stype2(unsigned char *buf, size_t num) stype2 *s_ptr; for(i = 0; i < num; i++) { - s_ptr = (stype2 *)buf + i; + s_ptr = (stype2 *)((void *)buf) + i; s_ptr->a = (int)(i * 8 + 0); s_ptr->b = (int)(i * 8 + 1); for(j = 0; j < 8; j++) @@ -1000,7 +1000,7 @@ initialize_stype3(unsigned char *buf, size_t num) stype3 *s_ptr; for(i = 0; i < (int)num; i++) { - s_ptr = (stype3 *)buf + i; + s_ptr = (stype3 *)((void *)buf) + i; s_ptr->a = i * 8 + 0; s_ptr->b = i * 8 + 1; for(j = 0; j < 8; j++) @@ -1031,7 +1031,7 @@ initialize_stype4(unsigned char *buf, size_t num) stype4 *s_ptr; for(i = 0; i < num; i++) { - s_ptr = (stype4 *)buf + i; + s_ptr = (stype4 *)((void *)buf) + i; s_ptr->a = (int)(i * 8 + 0); s_ptr->b = (int)(i * 8 + 1); for(j = 0; j < 8; j++) @@ -2219,7 +2219,7 @@ main (int argc, char *argv[]) fprintf(stderr, "usage: %s [--noopt]\n", argv[0]); exit(EXIT_FAILURE); } - H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1, H5T__conv_struct_opt); + H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1, (H5T_conv_t)((void (*) (void))H5T__conv_struct_opt)); } /* Create the file */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 2729ba1..645608b 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -627,7 +627,7 @@ test_hard_query(void) /* Unregister the hard conversion from int to float. Verify the conversion * is a soft conversion. */ - H5Tunregister(H5T_PERS_HARD, NULL, H5T_NATIVE_INT, H5T_NATIVE_FLOAT, H5T__conv_int_float); + H5Tunregister(H5T_PERS_HARD, NULL, H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (H5T_conv_t)((void (*) (void))H5T__conv_int_float)); if(H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != FALSE) { H5_FAILED(); printf("Can't query conversion function\n"); @@ -636,7 +636,7 @@ test_hard_query(void) /* Register the hard conversion from int to float. Verify the conversion * is a hard conversion. */ - H5Tregister(H5T_PERS_HARD, "int_flt", H5T_NATIVE_INT, H5T_NATIVE_FLOAT, H5T__conv_int_float); + H5Tregister(H5T_PERS_HARD, "int_flt", H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (H5T_conv_t)((void (*) (void))H5T__conv_int_float)); if(H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) { H5_FAILED(); printf("Can't query conversion function\n"); @@ -2578,34 +2578,34 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) printf("%*s", (int)(3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size)), ""); switch (dst_type) { case INT_SCHAR: - printf(" %29d\n", (int)*((signed char*)hw)); + printf(" %29d\n", (int)*((signed char*)((void *)hw))); break; case INT_UCHAR: - printf(" %29u\n", (unsigned)*((unsigned char*)hw)); + printf(" %29u\n", (unsigned)*((unsigned char*)((void *)hw))); break; case INT_SHORT: - printf(" %29hd\n", *((short*)hw)); + printf(" %29hd\n", *((short*)((void *)hw))); break; case INT_USHORT: - printf(" %29hu\n", *((unsigned short*)hw)); + printf(" %29hu\n", *((unsigned short*)((void *)hw))); break; case INT_INT: - printf(" %29d\n", *((int*)hw)); + printf(" %29d\n", *((int*)((void *)hw))); break; case INT_UINT: - printf(" %29u\n", *((unsigned*)hw)); + printf(" %29u\n", *((unsigned*)((void *)hw))); break; case INT_LONG: - printf(" %29ld\n", *((long*)hw)); + printf(" %29ld\n", *((long*)((void *)hw))); break; case INT_ULONG: - printf(" %29lu\n", *((unsigned long*)hw)); + printf(" %29lu\n", *((unsigned long*)((void *)hw))); break; case INT_LLONG: - HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"d\n", *((long long*)hw)); + HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"d\n", *((long long*)((void *)hw))); break; case INT_ULLONG: - HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"u\n", *((unsigned long long*)hw)); + HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"u\n", *((unsigned long long*)((void *)hw))); break; case FLT_FLOAT: case FLT_DOUBLE: @@ -4485,44 +4485,44 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) printf("%*s", (int)(3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size)), ""); switch (dst_type) { case INT_SCHAR: - printf(" %29d\n", (int)*((signed char*)hw)); + printf(" %29d\n", (int)*((signed char*)((void *)hw))); break; case INT_UCHAR: - printf(" %29u\n", (unsigned)*((unsigned char*)hw)); + printf(" %29u\n", (unsigned)*((unsigned char*)((void *)hw))); break; case INT_SHORT: - printf(" %29hd\n", *((short*)hw)); + printf(" %29hd\n", *((short*)((void *)hw))); break; case INT_USHORT: - printf(" %29hu\n", *((unsigned short*)hw)); + printf(" %29hu\n", *((unsigned short*)((void *)hw))); break; case INT_INT: - printf(" %29d\n", *((int*)hw)); + printf(" %29d\n", *((int*)((void *)hw))); break; case INT_UINT: - printf(" %29u\n", *((unsigned int*)hw)); + printf(" %29u\n", *((unsigned int*)((void *)hw))); break; case INT_LONG: - printf(" %29ld\n", *((long*)hw)); + printf(" %29ld\n", *((long*)((void *)hw))); break; case INT_ULONG: - printf(" %29lu\n", *((unsigned long*)hw)); + printf(" %29lu\n", *((unsigned long*)((void *)hw))); break; case INT_LLONG: - HDfprintf(stdout, " %29"H5_PRINTF_LL_WIDTH"d\n", *((long long*)hw)); + HDfprintf(stdout, " %29"H5_PRINTF_LL_WIDTH"d\n", *((long long*)((void *)hw))); break; case INT_ULLONG: - HDfprintf(stdout, " %29"H5_PRINTF_LL_WIDTH"u\n", *((unsigned long long*)hw)); + HDfprintf(stdout, " %29"H5_PRINTF_LL_WIDTH"u\n", *((unsigned long long*)((void *)hw))); break; case FLT_FLOAT: - printf(" %29f\n", (double)*((float*)hw)); + printf(" %29f\n", (double)*((float*)((void *)hw))); break; case FLT_DOUBLE: - printf(" %29f\n", *((double*)hw)); + printf(" %29f\n", *((double*)((void *)hw))); break; #if H5_SIZEOF_LONG_DOUBLE !=0 case FLT_LDOUBLE: - printf(" %29Lf\n", *((long double*)hw)); + printf(" %29Lf\n", *((long double*)((void *)hw))); break; #endif case OTHER: diff --git a/test/dtypes.c b/test/dtypes.c index 2056245..39fad9f 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -716,7 +716,7 @@ test_compound_2(void) bkg = (unsigned char*)HDmalloc(nelmts * sizeof(struct dt)); orig = (unsigned char*)HDmalloc(nelmts * sizeof(struct st)); for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; + s_ptr = ((struct st*)((void *)orig)) + i; s_ptr->a = i*8+0; s_ptr->b = i*8+1; s_ptr->c[0] = i*8+2; @@ -754,8 +754,8 @@ test_compound_2(void) /* Compare results */ for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; - d_ptr = ((struct dt*)buf) + i; + s_ptr = ((struct st*)((void *)orig)) + i; + d_ptr = ((struct dt*)((void *)buf)) + i; if (s_ptr->a != d_ptr->a || s_ptr->b != d_ptr->b || s_ptr->c[0] != d_ptr->c[0] || @@ -847,7 +847,7 @@ test_compound_3(void) bkg = (unsigned char*)HDmalloc(nelmts * sizeof(struct dt)); orig = (unsigned char*)HDmalloc(nelmts * sizeof(struct st)); for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; + s_ptr = ((struct st*)((void *)orig)) + i; s_ptr->a = i*8+0; s_ptr->b = i*8+1; s_ptr->c[0] = i*8+2; @@ -884,8 +884,8 @@ test_compound_3(void) /* Compare results */ for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; - d_ptr = ((struct dt*)buf) + i; + s_ptr = ((struct st*)((void *)orig)) + i; + d_ptr = ((struct dt*)((void *)buf)) + i; if (s_ptr->a != d_ptr->a || s_ptr->c[0] != d_ptr->c[0] || s_ptr->c[1] != d_ptr->c[1] || @@ -978,7 +978,7 @@ test_compound_4(void) bkg = (unsigned char*)HDmalloc(nelmts * sizeof(struct dt)); orig = (unsigned char*)HDmalloc(nelmts * sizeof(struct st)); for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; + s_ptr = ((struct st*)((void *)orig)) + i; s_ptr->a = i*8+0; s_ptr->b = (i*8+1) & 0x7fff; s_ptr->c[0] = i*8+2; @@ -1017,8 +1017,8 @@ test_compound_4(void) /* Compare results */ for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; - d_ptr = ((struct dt*)buf) + i; + s_ptr = ((struct st*)((void *)orig)) + i; + d_ptr = ((struct dt*)((void *)buf)) + i; if (s_ptr->a != d_ptr->a || s_ptr->b != d_ptr->b || s_ptr->c[0] != d_ptr->c[0] || @@ -1215,7 +1215,7 @@ test_compound_6(void) bkg = (unsigned char*)HDmalloc(nelmts * sizeof(struct dt)); orig = (unsigned char*)HDmalloc(nelmts * sizeof(struct st)); for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; + s_ptr = ((struct st*)((void *)orig)) + i; s_ptr->b = (i*8+1) & 0x7fff; s_ptr->d = (i*8+6) & 0x7fff; } @@ -1244,8 +1244,8 @@ test_compound_6(void) /* Compare results */ for (i=0; i<(int)nelmts; i++) { - s_ptr = ((struct st*)orig) + i; - d_ptr = ((struct dt*)buf) + i; + s_ptr = ((struct st*)((void *)orig)) + i; + d_ptr = ((struct dt*)((void *)buf)) + i; if (s_ptr->b != d_ptr->b || s_ptr->d != d_ptr->d) { H5_FAILED(); @@ -1694,14 +1694,20 @@ test_compound_8(void) static int test_compound_9(void) { - typedef struct cmpd_struct { + typedef struct cmpd_struct_w { int i1; const char* str; int i2; - } cmpd_struct; + } cmpd_struct_w; - cmpd_struct wdata = {11, "variable-length string", 22}; - cmpd_struct rdata; + typedef struct cmpd_struct_r { + int i1; + char* str; + int i2; + } cmpd_struct_r; + + cmpd_struct_w wdata = {11, "variable-length string", 22}; + cmpd_struct_r rdata; hid_t file; hid_t cmpd_tid, str_id, dup_tid; hid_t space_id; @@ -1720,13 +1726,13 @@ test_compound_9(void) } /* end if */ /* Create first compound datatype */ - if((cmpd_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct))) < 0) { + if((cmpd_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct_w))) < 0) { H5_FAILED(); AT(); printf("Can't create datatype!\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_tid,"i1",HOFFSET(struct cmpd_struct,i1),H5T_NATIVE_INT) < 0) { + if(H5Tinsert(cmpd_tid, "i1", HOFFSET(struct cmpd_struct_w, i1), H5T_NATIVE_INT) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'i1'\n"); goto error; @@ -1739,13 +1745,13 @@ test_compound_9(void) goto error; } /* end if */ - if(H5Tinsert(cmpd_tid, "vl_string", HOFFSET(cmpd_struct, str), str_id) < 0) { + if(H5Tinsert(cmpd_tid, "vl_string", HOFFSET(cmpd_struct_w, str), str_id) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'i1'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_tid, "i2", HOFFSET(struct cmpd_struct, i2), H5T_NATIVE_INT) < 0) { + if(H5Tinsert(cmpd_tid, "i2", HOFFSET(struct cmpd_struct_w, i2), H5T_NATIVE_INT) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'i2'\n"); goto error; @@ -2541,27 +2547,42 @@ error: static int test_compound_14(void) { - typedef struct cmpd_struct_1 { + typedef struct cmpd_struct_1_w { char c1; char c2; const char* str; - } cmpd_struct_1; + } cmpd_struct_1_w; - typedef struct cmpd_struct_2 { + typedef struct cmpd_struct_1_r { char c1; char c2; char* str; + } cmpd_struct_1_r; + + typedef struct cmpd_struct_2_w { + char c1; + char c2; + const char* str; long l1; long l2; long l3; long l4; - } cmpd_struct_2; + } cmpd_struct_2_w; - cmpd_struct_1 wdata1 = {'A', 'B', "variable-length string"}; + typedef struct cmpd_struct_2_r { + char c1; + char c2; + char* str; + long l1; + long l2; + long l3; + long l4; + } cmpd_struct_2_r; - cmpd_struct_1 rdata1; - cmpd_struct_2 wdata2 = {'C', 'D', "another vlen!", 1, 2, -1, 9001}; - cmpd_struct_2 rdata2; + cmpd_struct_1_w wdata1 = {'A', 'B', "variable-length string"}; + cmpd_struct_1_r rdata1; + cmpd_struct_2_w wdata2 = {'C', 'D', "another vlen!", 1, 2, -1, 9001}; + cmpd_struct_2_r rdata2; hid_t file; hid_t cmpd_m1_tid, cmpd_f1_tid, cmpd_m2_tid, cmpd_f2_tid, str_id; hid_t space_id; @@ -2580,19 +2601,19 @@ test_compound_14(void) } /* end if */ /* Create memory compound datatype 1 */ - if((cmpd_m1_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct_1))) < 0) { + if((cmpd_m1_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct_1_w))) < 0) { H5_FAILED(); AT(); printf("Can't create datatype!\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m1_tid,"c1",HOFFSET(struct cmpd_struct_1,c1),H5T_NATIVE_CHAR) < 0) { + if(H5Tinsert(cmpd_m1_tid,"c1",HOFFSET(struct cmpd_struct_1_w, c1), H5T_NATIVE_CHAR) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'c1'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m1_tid,"c2",HOFFSET(struct cmpd_struct_1,c2),H5T_NATIVE_CHAR) < 0) { + if(H5Tinsert(cmpd_m1_tid,"c2",HOFFSET(struct cmpd_struct_1_w, c2), H5T_NATIVE_CHAR) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'c2'\n"); goto error; @@ -2605,7 +2626,7 @@ test_compound_14(void) goto error; } /* end if */ - if(H5Tinsert(cmpd_m1_tid, "vl_string", HOFFSET(cmpd_struct_1, str), str_id) < 0) { + if(H5Tinsert(cmpd_m1_tid, "vl_string", HOFFSET(cmpd_struct_1_w, str), str_id) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'vl_string'\n"); goto error; @@ -2637,49 +2658,49 @@ test_compound_14(void) } /* end if */ /* Create memory compound datatype 2 */ - if((cmpd_m2_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct_2))) < 0) { + if((cmpd_m2_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct_2_w))) < 0) { H5_FAILED(); AT(); printf("Can't create datatype!\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m2_tid,"c1",HOFFSET(struct cmpd_struct_2,c1),H5T_NATIVE_CHAR) < 0) { + if(H5Tinsert(cmpd_m2_tid,"c1",HOFFSET(struct cmpd_struct_2_w, c1), H5T_NATIVE_CHAR) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'c1'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m2_tid,"c2",HOFFSET(struct cmpd_struct_2,c2),H5T_NATIVE_CHAR) < 0) { + if(H5Tinsert(cmpd_m2_tid,"c2",HOFFSET(struct cmpd_struct_2_w, c2), H5T_NATIVE_CHAR) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'c2'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m2_tid, "vl_string", HOFFSET(cmpd_struct_2, str), str_id) < 0) { + if(H5Tinsert(cmpd_m2_tid, "vl_string", HOFFSET(cmpd_struct_2_w, str), str_id) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'vl_string'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m2_tid,"l1",HOFFSET(struct cmpd_struct_2,l1),H5T_NATIVE_LONG) < 0) { + if(H5Tinsert(cmpd_m2_tid,"l1",HOFFSET(struct cmpd_struct_2_w, l1), H5T_NATIVE_LONG) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'l1'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m2_tid,"l2",HOFFSET(struct cmpd_struct_2,l2),H5T_NATIVE_LONG) < 0) { + if(H5Tinsert(cmpd_m2_tid,"l2",HOFFSET(struct cmpd_struct_2_w, l2), H5T_NATIVE_LONG) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'l2'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m2_tid,"l3",HOFFSET(struct cmpd_struct_2,l3),H5T_NATIVE_LONG) < 0) { + if(H5Tinsert(cmpd_m2_tid,"l3",HOFFSET(struct cmpd_struct_2_w, l3), H5T_NATIVE_LONG) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'l3'\n"); goto error; } /* end if */ - if(H5Tinsert(cmpd_m2_tid,"l4",HOFFSET(struct cmpd_struct_2,l4),H5T_NATIVE_LONG) < 0) { + if(H5Tinsert(cmpd_m2_tid,"l4",HOFFSET(struct cmpd_struct_2_w, l4), H5T_NATIVE_LONG) < 0) { H5_FAILED(); AT(); printf("Can't insert field 'l4'\n"); goto error; diff --git a/test/links.c b/test/links.c index 3166954..2658101 100644 --- a/test/links.c +++ b/test/links.c @@ -3569,27 +3569,27 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format) memb_map[H5FD_MEM_GHEAP] = H5FD_MEM_GHEAP; memb_map[H5FD_MEM_LHEAP] = H5FD_MEM_LHEAP; - sprintf(sv[H5FD_MEM_SUPER], "%%s-%c.h5", 's'); + HDsnprintf(sv[H5FD_MEM_SUPER], sizeof(sv[H5FD_MEM_SUPER]), "%%s-%c.h5", 's'); memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER]; memb_addr[H5FD_MEM_SUPER] = 0; - sprintf(sv[H5FD_MEM_BTREE], "%%s-%c.h5", 'b'); + HDsnprintf(sv[H5FD_MEM_BTREE], sizeof(sv[H5FD_MEM_BTREE]), "%%s-%c.h5", 'b'); memb_name[H5FD_MEM_BTREE] = sv[H5FD_MEM_BTREE]; memb_addr[H5FD_MEM_BTREE] = HADDR_MAX/6; - sprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r'); + HDsnprintf(sv[H5FD_MEM_DRAW], sizeof(sv[H5FD_MEM_DRAW]), "%%s-%c.h5", 'r'); memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW]; memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/3; - sprintf(sv[H5FD_MEM_GHEAP], "%%s-%c.h5", 'g'); + HDsnprintf(sv[H5FD_MEM_GHEAP], sizeof(sv[H5FD_MEM_GHEAP]), "%%s-%c.h5", 'g'); memb_name[H5FD_MEM_GHEAP] = sv[H5FD_MEM_GHEAP]; memb_addr[H5FD_MEM_GHEAP] = HADDR_MAX/2; - sprintf(sv[H5FD_MEM_LHEAP], "%%s-%c.h5", 'l'); + HDsnprintf(sv[H5FD_MEM_LHEAP], sizeof(sv[H5FD_MEM_LHEAP]), "%%s-%c.h5", 'l'); memb_name[H5FD_MEM_LHEAP] = sv[H5FD_MEM_LHEAP]; memb_addr[H5FD_MEM_LHEAP] = (HADDR_MAX/3)*2; - sprintf(sv[H5FD_MEM_OHDR], "%%s-%c.h5", 'o'); + HDsnprintf(sv[H5FD_MEM_OHDR], sizeof(sv[H5FD_MEM_OHDR]), "%%s-%c.h5", 'o'); memb_name[H5FD_MEM_OHDR] = sv[H5FD_MEM_OHDR]; memb_addr[H5FD_MEM_OHDR] = (HADDR_MAX/6)*5; @@ -4628,7 +4628,7 @@ external_link_win3(hid_t fapl, hbool_t new_format) /* set up name for target link: "<drive-letter>:tmp/extlinks12" */ drive = HDgetdrive(); - sprintf(tmpname, "%c:%s", (drive+'A'-1), FILENAME[32]); + HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[32]); h5_fixname(tmpname, fapl, filename2, sizeof filename2); /* set up name for target file: "tmp/extlinks12" */ @@ -4713,11 +4713,11 @@ external_link_win4(hid_t fapl, hbool_t new_format) /* set up name for main file: "<drive-letter>:tmp/extlinks0" */ drive = HDgetdrive(); - sprintf(tmpname, "%c:%s", (drive+'A'-1), FILENAME[13]); + HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[13]); h5_fixname(tmpname, fapl, filename1, sizeof filename1); /* set up name for target link: "<drive-letter>:extlinks13" */ - sprintf(tmpname, "%c:%s", (drive+'A'-1), FILENAME[33]); + HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[33]); h5_fixname(tmpname, fapl, filename2, sizeof filename2); /* set up name for target file: "tmp/extlinks13" */ @@ -4813,7 +4813,7 @@ external_link_win5(hid_t fapl, hbool_t new_format) h5_fixname(tmpname, fapl, filename1, sizeof filename1); /* set up name for target link: "<drive-letter+1>:tmp/extlinks14" */ - sprintf(tmpname, "%c:%s", ((drive+1)+'A'-1), FILENAME[35]); + HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", ((drive+1)+'A'-1), FILENAME[35]); h5_fixname(tmpname, fapl, filename2, sizeof filename2); /* set up name for target file: "tmp/extlinks14" */ @@ -4906,7 +4906,7 @@ external_link_win6(hid_t fapl, hbool_t new_format) h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1); /* set up name for target link: "<drive-letter+1>:tmp/extlinks15" */ - sprintf(tmpname, "%c:%s", ((drive+1)+'A'-1), FILENAME[36]); + HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", ((drive+1)+'A'-1), FILENAME[36]); h5_fixname(tmpname, fapl, filename2, sizeof filename2); /* set up name for target file: "tmp/extlinks15" */ @@ -5085,7 +5085,7 @@ external_link_win8(hid_t fapl, hbool_t new_format) /* set up name for target link: "<drive-letter>:\CWD\extlinks10" */ drive = HDgetdrive(); - sprintf(tmpname, "\\\\?\\%c:%s\\%s", (drive+'A'-1), &cwdpath[2], FILENAME[30]); + HDsnprintf(tmpname, sizeof(tmpname), "\\\\?\\%c:%s\\%s", (drive+'A'-1), &cwdpath[2], FILENAME[30]); h5_fixname(tmpname, fapl, filename2, sizeof filename2); /* set up name for target file: "extlinks10" */ @@ -5569,7 +5569,7 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format) /* Create enough objects in the root group to change it into a "dense" group */ for(u = 0; u < max_compact; u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(gid2) < 0) TEST_ERROR } /* end for */ @@ -5612,7 +5612,7 @@ external_link_unlink_dense(hid_t fapl, hbool_t new_format) /* Remove enough objects in the root group to change it into a "compact" group */ for(u = 0; u < ((max_compact - min_dense) + 1); u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if(H5Ldelete(gid, objname, H5P_DEFAULT) < 0) FAIL_STACK_ERROR } /* end for */ @@ -5897,7 +5897,7 @@ external_link_ride(hid_t fapl, hbool_t new_format) /* Create enough objects in the root group to change it into a "dense" group */ for(u = 0; u < (max_compact + 1); u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((gid2 = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(gid2) < 0) TEST_ERROR } /* end for */ @@ -5966,7 +5966,7 @@ external_link_ride(hid_t fapl, hbool_t new_format) /* Remove enough objects in the root group to change it into a "compact" group */ for(u = 0; u < ((max_compact - min_dense) + 3); u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if(H5Ldelete(gid, objname, H5P_DEFAULT) < 0) FAIL_STACK_ERROR } /* end for */ @@ -10654,7 +10654,7 @@ corder_create_compact(hid_t fapl) /* Create several links, but keep group in compact form */ for(u = 0; u < max_compact; u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(group_id2) < 0) TEST_ERROR @@ -10693,7 +10693,7 @@ corder_create_compact(hid_t fapl) H5L_info_t linfo; /* Link information */ /* Retrieve information for link */ - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if(H5Lget_info(group_id, objname, &linfo, H5P_DEFAULT) < 0) TEST_ERROR /* Verify creation order of link */ @@ -10774,7 +10774,7 @@ corder_create_dense(hid_t fapl) /* Create several links, up to limit of compact form */ for(u = 0; u < max_compact; u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(group_id2) < 0) TEST_ERROR @@ -10786,7 +10786,7 @@ corder_create_dense(hid_t fapl) } /* end for */ /* Create another link, to push group into dense form */ - sprintf(objname, "filler %u", max_compact); + HDsnprintf(objname, sizeof(objname), "filler %u", max_compact); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(group_id2) < 0) TEST_ERROR @@ -10826,7 +10826,7 @@ corder_create_dense(hid_t fapl) H5L_info_t linfo; /* Link information */ /* Retrieve information for link */ - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if(H5Lget_info(group_id, objname, &linfo, H5P_DEFAULT) < 0) TEST_ERROR /* Verify creation order of link */ @@ -10928,13 +10928,13 @@ corder_transition(hid_t fapl) /* Create several links, up to limit of compact form */ for(u = 0; u < max_compact; u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(group_id2) < 0) TEST_ERROR } /* end for */ /* Create another link, to push group into dense form */ - sprintf(objname, "filler %u", max_compact); + HDsnprintf(objname, sizeof(objname), "filler %u", max_compact); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(group_id2) < 0) TEST_ERROR @@ -10949,7 +10949,7 @@ corder_transition(hid_t fapl) /* Delete several links from group, until it resumes compact form */ for(u = max_compact; u >= min_dense; u--) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if(H5Ldelete(group_id, objname, H5P_DEFAULT) < 0) TEST_ERROR /* Verify state of group */ @@ -10963,7 +10963,7 @@ corder_transition(hid_t fapl) } /* end for */ /* Delete another link, to push group into compact form */ - sprintf(objname, "filler %u", (min_dense - 1)); + HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1)); if(H5Ldelete(group_id, objname, H5P_DEFAULT) < 0) TEST_ERROR /* Verify state of group */ @@ -10974,7 +10974,7 @@ corder_transition(hid_t fapl) /* Re-add links to get back into dense form */ for(u = (min_dense - 1); u < (max_compact + 1); u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(group_id2) < 0) TEST_ERROR } /* end for */ @@ -11012,7 +11012,7 @@ corder_transition(hid_t fapl) /* Delete several links from group, until it resumes compact form */ for(u = max_compact; u >= min_dense; u--) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if(H5Ldelete(group_id, objname, H5P_DEFAULT) < 0) TEST_ERROR /* Verify state of group */ @@ -11026,7 +11026,7 @@ corder_transition(hid_t fapl) } /* end for */ /* Delete another link, to push group into compact form */ - sprintf(objname, "filler %u", (min_dense - 1)); + HDsnprintf(objname, sizeof(objname), "filler %u", (min_dense - 1)); if(H5Ldelete(group_id, objname, H5P_DEFAULT) < 0) TEST_ERROR /* Verify state of group */ @@ -11037,7 +11037,7 @@ corder_transition(hid_t fapl) /* Re-add links to get back into dense form */ for(u = (min_dense - 1); u < (max_compact + 1); u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(group_id2) < 0) TEST_ERROR } /* end for */ @@ -11053,10 +11053,10 @@ corder_transition(hid_t fapl) /* Delete all the links */ for(u = max_compact; u > 0; u--) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if(H5Ldelete(group_id, objname, H5P_DEFAULT) < 0) TEST_ERROR } /* end for */ - sprintf(objname, "filler %u", (unsigned)0); + HDsnprintf(objname, sizeof(objname), "filler %u", (unsigned)0); if(H5Ldelete(group_id, objname, H5P_DEFAULT) < 0) TEST_ERROR /* Close the group */ @@ -11156,7 +11156,7 @@ corder_delete(hid_t fapl) /* Create links until the group is in dense form */ for(u = 0; u < max_compact * 2; u++) { - sprintf(objname, "filler %u", u); + HDsnprintf(objname, sizeof(objname), "filler %u", u); if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR if(H5Gclose(group_id2) < 0) FAIL_STACK_ERROR } /* end for */ @@ -11238,7 +11238,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, H5L_info_t linfo; /* Link info struct */ /* Make link value for increasing/native order queries */ - sprintf(valname, "value %02u", (unsigned)n); + HDsnprintf(valname, sizeof(valname), "value %02u", (unsigned)n); /* Verify the link information for first link, in increasing creation order */ HDmemset(&linfo, 0, sizeof(linfo)); @@ -11449,7 +11449,7 @@ link_info_by_idx(hid_t fapl) /* Create several links, up to limit of compact form */ for(u = 0; u < max_compact; u++) { /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Check for creating hard or soft link */ if(hard_link) { @@ -11461,7 +11461,7 @@ link_info_by_idx(hid_t fapl) } /* end if */ else { /* Make value for link */ - sprintf(valname, "value %02u", u); + HDsnprintf(valname, sizeof(valname), "value %02u", u); /* Create soft link */ if(H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR @@ -11491,7 +11491,7 @@ link_info_by_idx(hid_t fapl) /* Create more links, to push group into dense form */ for(; u < (max_compact * 2); u++) { /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Check for creating hard or soft link */ if(hard_link) { @@ -11503,7 +11503,7 @@ link_info_by_idx(hid_t fapl) } /* end if */ else { /* Make value for link */ - sprintf(valname, "value %02u", u); + HDsnprintf(valname, sizeof(valname), "value %02u", u); /* Create soft link */ if(H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR @@ -11603,7 +11603,7 @@ link_info_by_idx_old(hid_t fapl) /* Create several links */ for(u = 0; u < CORDER_NLINKS; u++) { /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Check for creating hard or soft link */ if(hard_link) { @@ -11621,7 +11621,7 @@ link_info_by_idx_old(hid_t fapl) } /* end if */ else { /* Make value for link */ - sprintf(valname, "value %02u", u); + HDsnprintf(valname, sizeof(valname), "value %02u", u); /* Create soft link */ if(H5Lcreate_soft(valname, group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR @@ -11633,10 +11633,10 @@ link_info_by_idx_old(hid_t fapl) unsigned dec_u = CORDER_NLINKS - (u + 1); /* Decreasing mapped index */ /* Make link name for increasing/native order queries */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Make link value for increasing/native order queries */ - sprintf(valname, "value %02u", u); + HDsnprintf(valname, sizeof(valname), "value %02u", u); /* Verify link information (in increasing order) */ if(hard_link) { @@ -11669,10 +11669,10 @@ link_info_by_idx_old(hid_t fapl) /* Make link name for decreasing order queries */ - sprintf(objname, "filler %02u", dec_u); + HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); /* Make link value for decreasing order queries */ - sprintf(valname, "value %02u", dec_u); + HDsnprintf(valname, sizeof(valname), "value %02u", dec_u); /* Verify link information (in decreasing order) */ if(hard_link) { @@ -11827,7 +11827,7 @@ delete_by_idx(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -11865,9 +11865,9 @@ delete_by_idx(hid_t fapl) HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); if(H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR if(order == H5_ITER_INC) - sprintf(objname, "filler %02u", (u + 1)); + HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else - sprintf(objname, "filler %02u", (max_compact - (u + 2))); + HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2))); if(HDstrcmp(objname, tmpname)) TEST_ERROR } /* end for */ @@ -11882,7 +11882,7 @@ delete_by_idx(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -11921,9 +11921,9 @@ delete_by_idx(hid_t fapl) HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); if(H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR if(order == H5_ITER_INC) - sprintf(objname, "filler %02u", (u + 1)); + HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else - sprintf(objname, "filler %02u", ((max_compact * 2) - (u + 2))); + HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2))); if(HDstrcmp(objname, tmpname)) TEST_ERROR } /* end for */ @@ -11949,7 +11949,7 @@ delete_by_idx(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -11982,9 +11982,9 @@ delete_by_idx(hid_t fapl) HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); if(H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR if(order == H5_ITER_INC) - sprintf(objname, "filler %02u", ((u * 2) + 1)); + HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1)); else - sprintf(objname, "filler %02u", ((max_compact * 2) - ((u * 2) + 2))); + HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - ((u * 2) + 2))); if(HDstrcmp(objname, tmpname)) TEST_ERROR } /* end for */ @@ -12007,9 +12007,9 @@ delete_by_idx(hid_t fapl) HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); if(H5Lget_name_by_idx(group_id, ".", idx_type, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR if(order == H5_ITER_INC) - sprintf(objname, "filler %02u", ((u * 2) + 3)); + HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3)); else - sprintf(objname, "filler %02u", ((max_compact * 2) - ((u * 2) + 4))); + HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - ((u * 2) + 4))); if(HDstrcmp(objname, tmpname)) TEST_ERROR } /* end for */ @@ -12106,7 +12106,7 @@ delete_by_idx_old(hid_t fapl) H5O_info_t oi; /* Buffer for querying object's info */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create group */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -12152,9 +12152,9 @@ delete_by_idx_old(hid_t fapl) HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); if(H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR if(order == H5_ITER_INC) - sprintf(objname, "filler %02u", (u + 1)); + HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else - sprintf(objname, "filler %02u", dec_u); + HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); if(HDstrcmp(objname, tmpname)) TEST_ERROR } /* end for */ @@ -12179,7 +12179,7 @@ delete_by_idx_old(hid_t fapl) H5O_info_t oi; /* Buffer for querying object's info */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create group */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -12213,9 +12213,9 @@ delete_by_idx_old(hid_t fapl) HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); if(H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR if(order == H5_ITER_INC) - sprintf(objname, "filler %02u", ((u * 2) + 1)); + HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1)); else - sprintf(objname, "filler %02u", dec_u); + HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); if(HDstrcmp(objname, tmpname)) TEST_ERROR } /* end for */ @@ -12240,9 +12240,9 @@ delete_by_idx_old(hid_t fapl) HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE); if(H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR if(order == H5_ITER_INC) - sprintf(objname, "filler %02u", ((u * 2) + 3)); + HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3)); else - sprintf(objname, "filler %02u", dec_u); + HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); if(HDstrcmp(objname, tmpname)) TEST_ERROR } /* end for */ @@ -12323,7 +12323,7 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info_t *info, } /* end if */ /* Verify name of link */ - sprintf(objname, "filler %02u", (unsigned)my_info.corder); + HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder); if(HDstrcmp(link_name, objname)) return(H5_ITER_ERROR); @@ -12669,7 +12669,7 @@ link_iterate(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -12695,7 +12695,7 @@ link_iterate(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -12795,7 +12795,7 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info_t *inf } /* end if */ /* Verify name of link */ - sprintf(objname, "filler %02u", (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped))); + HDsnprintf(objname, sizeof(objname), "filler %02u", (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped))); if(HDstrcmp(link_name, objname)) return(H5_ITER_ERROR); @@ -13082,7 +13082,7 @@ link_iterate_old(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13211,7 +13211,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, /* Mount a file over a group in main group */ mnt_idx = 2; - sprintf(mntname, "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx); + HDsnprintf(mntname, sizeof(mntname), "/%s/filler %02u", CORDER_GROUP_NAME, mnt_idx); if(H5Fmount(main_group_id, mntname, mount_file_id, H5P_DEFAULT) < 0) TEST_ERROR /* Open the object that the file is mounted on */ @@ -13269,7 +13269,7 @@ open_by_idx(hid_t fapl) H5O_info_t oi; /* Buffer for querying object's info */ char filename[NAME_BUF_SIZE];/* File name */ char objname[NAME_BUF_SIZE]; /* Object name */ - char valname[NAME_BUF_SIZE]; /* Link value */ + char valname[2 * NAME_BUF_SIZE]; /* Link value */ haddr_t *objno = NULL; /* Addresses of the objects created */ unsigned u; /* Local index variable */ hid_t ret; /* Generic return value */ @@ -13363,7 +13363,7 @@ open_by_idx(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13376,7 +13376,7 @@ open_by_idx(hid_t fapl) if(H5Gclose(group_id2) < 0) TEST_ERROR /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR } /* end for */ @@ -13398,7 +13398,7 @@ open_by_idx(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13411,7 +13411,7 @@ open_by_idx(hid_t fapl) if(H5Gclose(group_id2) < 0) TEST_ERROR /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR } /* end for */ @@ -13494,7 +13494,7 @@ open_by_idx_old(hid_t fapl) H5O_info_t oi; /* Buffer for querying object's info */ char filename[NAME_BUF_SIZE];/* File name */ char objname[NAME_BUF_SIZE]; /* Object name */ - char valname[NAME_BUF_SIZE]; /* Link value */ + char valname[2 * NAME_BUF_SIZE]; /* Link value */ haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */ unsigned u; /* Local index variable */ hid_t ret; /* Generic return value */ @@ -13540,7 +13540,7 @@ open_by_idx_old(hid_t fapl) hid_t group_id2; /* Group ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13553,7 +13553,7 @@ open_by_idx_old(hid_t fapl) if(H5Gclose(group_id2) < 0) TEST_ERROR /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR } /* end for */ @@ -13637,7 +13637,7 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, /* Open each object in group by name and check that it's the correct one */ for(u = 0; u < max_links; u++) { /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Query the object's information, by name */ if(H5Oget_info_by_name2(group_id, objname, &oinfo, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS, H5P_DEFAULT) < 0) TEST_ERROR @@ -13705,7 +13705,7 @@ object_info(hid_t fapl) H5O_info_t oinfo; /* Buffer for querying object's info */ char filename[NAME_BUF_SIZE];/* File name */ char objname[NAME_BUF_SIZE]; /* Object name */ - char valname[NAME_BUF_SIZE]; /* Link value */ + char valname[2 * NAME_BUF_SIZE]; /* Link value */ char attrname[NAME_BUF_SIZE]; /* Attribute name */ haddr_t *objno = NULL; /* Addresses of the objects created */ herr_t ret; /* Generic return value */ @@ -13799,7 +13799,7 @@ object_info(hid_t fapl) hid_t attr_id; /* Attribute ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13811,7 +13811,7 @@ object_info(hid_t fapl) /* Create attributes on new object */ for(v = 0; v < u; v++) { /* Make name for attribute */ - sprintf(attrname, "attr %02u", v); + HDsnprintf(attrname, sizeof(attrname), "attr %02u", v); /* Create attribute */ if((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13824,7 +13824,7 @@ object_info(hid_t fapl) if(H5Gclose(group_id2) < 0) TEST_ERROR /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR } /* end for */ @@ -13847,7 +13847,7 @@ object_info(hid_t fapl) hid_t attr_id; /* Attribute ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13859,7 +13859,7 @@ object_info(hid_t fapl) /* Create attributes on new object */ for(v = 0; v < u; v++) { /* Make name for attribute */ - sprintf(attrname, "attr %02u", v); + HDsnprintf(attrname, sizeof(attrname), "attr %02u", v); /* Create attribute */ if((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -13872,7 +13872,7 @@ object_info(hid_t fapl) if(H5Gclose(group_id2) < 0) TEST_ERROR /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR } /* end for */ @@ -13950,7 +13950,7 @@ object_info_old(hid_t fapl) H5O_info_t oinfo; /* Buffer for querying object's info */ char filename[NAME_BUF_SIZE];/* File name */ char objname[NAME_BUF_SIZE]; /* Object name */ - char valname[NAME_BUF_SIZE]; /* Link value */ + char valname[2 * NAME_BUF_SIZE]; /* Link value */ char attrname[NAME_BUF_SIZE]; /* Attribute name */ haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */ herr_t ret; /* Generic return value */ @@ -13996,7 +13996,7 @@ object_info_old(hid_t fapl) hid_t attr_id; /* Attribute ID */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14008,7 +14008,7 @@ object_info_old(hid_t fapl) /* Create attributes on new object */ for(v = 0; v < u; v++) { /* Make name for attribute */ - sprintf(attrname, "attr %02u", v); + HDsnprintf(attrname, sizeof(attrname), "attr %02u", v); /* Create attribute */ if((attr_id = H5Acreate2(group_id2, attrname, H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14021,7 +14021,7 @@ object_info_old(hid_t fapl) if(H5Gclose(group_id2) < 0) TEST_ERROR /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR } /* end for */ @@ -14102,7 +14102,7 @@ group_info(hid_t fapl) char filename[NAME_BUF_SIZE];/* File name */ char objname[NAME_BUF_SIZE]; /* Object name */ char objname2[NAME_BUF_SIZE]; /* Object name */ - char valname[NAME_BUF_SIZE]; /* Link value */ + char valname[2 * NAME_BUF_SIZE]; /* Link value */ herr_t ret; /* Generic return value */ unsigned u, v; /* Local index variables */ @@ -14187,7 +14187,7 @@ group_info(hid_t fapl) hid_t group_id2, group_id3; /* Group IDs */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14221,7 +14221,7 @@ group_info(hid_t fapl) /* Create objects in new group created */ for(v = 0; v <= u; v++) { /* Make name for link */ - sprintf(objname2, "filler %02u", v); + HDsnprintf(objname2, sizeof(objname2), "filler %02u", v); /* Create hard link, with group object */ if((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14301,7 +14301,7 @@ group_info(hid_t fapl) /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Retrieve soft link group's information, by name */ @@ -14328,7 +14328,7 @@ group_info(hid_t fapl) hid_t group_id2, group_id3; /* Group IDs */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14362,7 +14362,7 @@ group_info(hid_t fapl) /* Create objects in new group created */ for(v = 0; v <= u; v++) { /* Make name for link */ - sprintf(objname2, "filler %02u", v); + HDsnprintf(objname2, sizeof(objname2), "filler %02u", v); /* Create hard link, with group object */ if((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14442,7 +14442,7 @@ group_info(hid_t fapl) /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Retrieve soft link group's information, by name */ @@ -14519,7 +14519,7 @@ group_info_old(hid_t fapl) char filename[NAME_BUF_SIZE];/* File name */ char objname[NAME_BUF_SIZE]; /* Object name */ char objname2[NAME_BUF_SIZE]; /* Object name */ - char valname[NAME_BUF_SIZE]; /* Link value */ + char valname[2 * NAME_BUF_SIZE]; /* Link value */ herr_t ret; /* Generic return value */ unsigned u, v; /* Local index variables */ @@ -14558,7 +14558,7 @@ group_info_old(hid_t fapl) hid_t group_id2, group_id3; /* Group IDs */ /* Make name for link */ - sprintf(objname, "filler %02u", u); + HDsnprintf(objname, sizeof(objname), "filler %02u", u); /* Create hard link, with group object */ if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14592,7 +14592,7 @@ group_info_old(hid_t fapl) /* Create objects in new group created */ for(v = 0; v <= u; v++) { /* Make name for link */ - sprintf(objname2, "filler %02u", v); + HDsnprintf(objname2, sizeof(objname2), "filler %02u", v); /* Create hard link, with group object */ if((group_id3 = H5Gcreate2(group_id2, objname2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -14672,7 +14672,7 @@ group_info_old(hid_t fapl) /* Create soft link in another group, to objects in main group */ - sprintf(valname, "/%s/%s", CORDER_GROUP_NAME, objname); + HDsnprintf(valname, sizeof(valname), "/%s/%s", CORDER_GROUP_NAME, objname); if(H5Lcreate_soft(valname, soft_group_id, objname, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR /* Retrieve soft link group's information, by name */ diff --git a/test/objcopy.c b/test/objcopy.c index e646c87..1f89e16 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -986,15 +986,15 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, * for each */ for(elmt=0; elmt<nelmts; elmt++) { /* Check vlen lengths */ - if(((const hvl_t *)memb1)->len - != ((const hvl_t *)memb2)->len) + if(((const hvl_t *)((const void *)memb1))->len + != ((const hvl_t *)((const void *)memb2))->len) TEST_ERROR /* Check vlen data */ if(!compare_data(parent1, parent2, pid, base_id, - ((const hvl_t *)memb1)->len, - ((const hvl_t *)memb1)->p, - ((const hvl_t *)memb2)->p, obj_owner)) + ((const hvl_t *)((const void *)memb1))->len, + ((const hvl_t *)((const void *)memb1))->p, + ((const hvl_t *)((const void *)memb2))->p, obj_owner)) TEST_ERROR /* Update member pointers */ @@ -13425,7 +13425,7 @@ test_copy_iterate(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl hid_t fid1 = -1, fid2 = -1; /* File IDs */ hid_t gid = -1; /* Group ID */ int i; - char grp_name[8]; + char grp_name[16]; char src_filename[NAME_BUF_SIZE]; char dst_filename[NAME_BUF_SIZE]; diff --git a/test/tarray.c b/test/tarray.c index d8ededf..eb71ad6 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -1074,7 +1074,7 @@ test_array_free_custom(void *_mem, void *info) if(_mem != NULL) { mem = ((unsigned char *)_mem) - extra; - *mem_used -= *(size_t *)mem; + *mem_used -= *(size_t *)((void *)mem); HDfree(mem); } /* end if */ diff --git a/test/tchecksum.c b/test/tchecksum.c index ffbab45..6e509fb 100644 --- a/test/tchecksum.c +++ b/test/tchecksum.c @@ -252,7 +252,7 @@ test_checksum(void) * *------------------------------------------------------------------------- */ -H5_ATTR_PURE H5_ATTR_CONST void +void cleanup_checksum(void) { /* no file to clean */ diff --git a/test/tconfig.c b/test/tconfig.c index b652ca4..1a81d50 100644 --- a/test/tconfig.c +++ b/test/tconfig.c @@ -83,7 +83,7 @@ test_configure(void) * *------------------------------------------------------------------------- */ -H5_ATTR_PURE void +void cleanup_configure(void) { /* no file to clean */ @@ -106,7 +106,7 @@ cleanup_configure(void) * *------------------------------------------------------------------------- */ -H5_ATTR_PURE void +void test_config_ctypes(void) { /* standard C89 basic types */ @@ -215,7 +215,7 @@ test_config_ctypes(void) * *------------------------------------------------------------------------- */ -H5_ATTR_PURE void +void test_exit_definitions(void) { /* Verify the EXIT_SUCCESS and EXIT_FAILURE are 0 and 1 respectively. */ diff --git a/test/tmeta.c b/test/tmeta.c index 7eeb493..ceb7d2b 100644 --- a/test/tmeta.c +++ b/test/tmeta.c @@ -121,7 +121,7 @@ test_metadata(void) * *------------------------------------------------------------------------- */ -H5_ATTR_PURE H5_ATTR_CONST void +void cleanup_metadata(void) { /* no file to clean */ diff --git a/test/tsohm.c b/test/tsohm.c index ef031c1..99df6b7 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -742,7 +742,8 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, hbool_t test_file_ *---------------------------------------------------------------------------- */ static h5_stat_size_t -getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, hbool_t test_file_closing, H5O_info_t *oinfo) +getsize_testsize1(const char *filename, hid_t fcpl_id, hid_t fapl_id, + hbool_t test_file_closing, H5O_info_t *oinfo) { hid_t fid = H5I_INVALID_HID; herr_t ret; @@ -828,7 +829,6 @@ test_sohm_size1(void) for (use_shared = 0; use_shared < 2; use_shared++) { for (use_btree = 0; use_btree < 2; use_btree++) { - hbool_t test_open_close; /* cannot use btree indexing without shared messages; skip case */ @@ -950,6 +950,7 @@ test_sohm_size1(void) } /* test_sohm_size1 */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ /*--------------------------------------------------------------------------- * Function: test_sohm_size_consistency_open_create @@ -1020,7 +1021,7 @@ test_sohm_size_consistency_open_create(void) * Add messages to previously-created file */ file = H5Fopen(FILENAME, H5F_ACC_RDWR, fapl_id); CHECK_I(file, "H5Fopen"); - file = size1_helper(file, FILENAME, fapl_id, 0); + file = size1_helper(file, FILENAME, fapl_id, FALSE); CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ @@ -1035,7 +1036,7 @@ test_sohm_size_consistency_open_create(void) * Add messages to a newly-created file */ file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, fapl_id); CHECK_I(file, "H5Fcreate"); - file = size1_helper(file, FILENAME, fapl_id, 0); + file = size1_helper(file, FILENAME, fapl_id, FALSE); CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ diff --git a/test/tvlstr.c b/test/tvlstr.c index 77589bb..5f715ce 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -94,7 +94,7 @@ void test_vlstr_free_custom(void *_mem, void *info) if(_mem!=NULL) { mem=((unsigned char *)_mem)-extra; - *mem_used-=*(size_t *)mem; + *mem_used-=*(size_t *)((void *)mem); HDfree(mem); } /* end if */ } diff --git a/test/tvltypes.c b/test/tvltypes.c index 8824066..ffa2aff 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -88,7 +88,7 @@ void test_vltypes_free_custom(void *_mem, void *mem_used) */ unsigned char *mem = ((unsigned char *)_mem) - extra; /* Pointer to actual block allocated */ - *(size_t *)mem_used -= *(size_t *)mem; + *(size_t *)mem_used -= *(size_t *)((void *)mem); HDfree(mem); } /* end if */ } @@ -12152,7 +12152,6 @@ main(void) hid_t my_fapl = -1; /* File access property list */ int test_api_config; unsigned bit_config; - unsigned latest = FALSE; /* Using the latest library version bound */ H5F_libver_t low, high; /* Low and high bounds */ int nerrors = 0; @@ -12180,10 +12179,6 @@ main(void) if(high < H5F_LIBVER_V110) continue; - /* Whether to use latest hyperslab/point selection version */ - if(low >= H5F_LIBVER_V112) - latest = TRUE; - /* Set the low/high version bounds */ if(H5Pset_libver_bounds(my_fapl, low, high) < 0) TEST_ERROR diff --git a/test/vds_env.c b/test/vds_env.c index d3a28fb..9c7b698 100644 --- a/test/vds_env.c +++ b/test/vds_env.c @@ -302,7 +302,6 @@ main(void) hid_t fapl, my_fapl; unsigned bit_config; H5F_libver_t low, high; /* Low and high bounds */ - unsigned latest = FALSE; /* Using the latest library version bound */ int nerrors = 0; /* Testing setup */ @@ -327,10 +326,6 @@ main(void) if(high < H5F_LIBVER_V110) continue; - /* Whether to use latest hyperslab/point selection version */ - if(low >= H5F_LIBVER_V112) - latest = TRUE; - /* Set the low/high version bounds */ if(H5Pset_libver_bounds(my_fapl, low, high) < 0) TEST_ERROR |