h5committested.
This commit is contained in:
@@ -697,9 +697,9 @@ test_compound_2(void)
|
||||
FAIL_STACK_ERROR
|
||||
|
||||
/* Sizes should be the same, but be careful just in case */
|
||||
buf = (unsigned char*)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
bkg = (unsigned char*)malloc(nelmts * sizeof(struct dt));
|
||||
orig = (unsigned char*)malloc(nelmts * sizeof(struct st));
|
||||
buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
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->a = i*8+0;
|
||||
@@ -762,9 +762,9 @@ test_compound_2(void)
|
||||
}
|
||||
|
||||
/* Release resources */
|
||||
free(buf);
|
||||
free(bkg);
|
||||
free(orig);
|
||||
HDfree(buf);
|
||||
HDfree(bkg);
|
||||
HDfree(orig);
|
||||
CHECK_NMEMBS(nmembs , st, dt)
|
||||
|
||||
PASSED();
|
||||
@@ -818,9 +818,9 @@ test_compound_3(void)
|
||||
FAIL_STACK_ERROR
|
||||
|
||||
/* Initialize */
|
||||
buf = (unsigned char*)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
bkg = (unsigned char*)malloc(nelmts * sizeof(struct dt));
|
||||
orig = (unsigned char*)malloc(nelmts * sizeof(struct st));
|
||||
buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
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->a = i*8+0;
|
||||
@@ -880,9 +880,9 @@ test_compound_3(void)
|
||||
}
|
||||
|
||||
/* Release resources */
|
||||
free(buf);
|
||||
free(bkg);
|
||||
free(orig);
|
||||
HDfree(buf);
|
||||
HDfree(bkg);
|
||||
HDfree(orig);
|
||||
CHECK_NMEMBS(nmembs, st, dt)
|
||||
|
||||
PASSED();
|
||||
@@ -940,9 +940,9 @@ test_compound_4(void)
|
||||
FAIL_STACK_ERROR
|
||||
|
||||
/* Sizes should be the same, but be careful just in case */
|
||||
buf = (unsigned char*)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
bkg = (unsigned char*)malloc(nelmts * sizeof(struct dt));
|
||||
orig = (unsigned char*)malloc(nelmts * sizeof(struct st));
|
||||
buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
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->a = i*8+0;
|
||||
@@ -1006,9 +1006,9 @@ test_compound_4(void)
|
||||
}
|
||||
|
||||
/* Release resources */
|
||||
free(buf);
|
||||
free(bkg);
|
||||
free(orig);
|
||||
HDfree(buf);
|
||||
HDfree(bkg);
|
||||
HDfree(orig);
|
||||
CHECK_NMEMBS(nmembs, st, dt)
|
||||
|
||||
PASSED();
|
||||
@@ -1175,9 +1175,9 @@ test_compound_6(void)
|
||||
FAIL_STACK_ERROR
|
||||
|
||||
/* Sizes should be the same, but be careful just in case */
|
||||
buf = (unsigned char*)malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
bkg = (unsigned char*)malloc(nelmts * sizeof(struct dt));
|
||||
orig = (unsigned char*)malloc(nelmts * sizeof(struct st));
|
||||
buf = (unsigned char*)HDmalloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt)));
|
||||
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->b = (i*8+1) & 0x7fff;
|
||||
@@ -1223,9 +1223,9 @@ test_compound_6(void)
|
||||
}
|
||||
|
||||
/* Release resources */
|
||||
free(buf);
|
||||
free(bkg);
|
||||
free(orig);
|
||||
HDfree(buf);
|
||||
HDfree(bkg);
|
||||
HDfree(orig);
|
||||
CHECK_NMEMBS(nmembs, st, dt)
|
||||
|
||||
PASSED();
|
||||
@@ -1790,7 +1790,7 @@ test_compound_9(void)
|
||||
} /* end if */
|
||||
|
||||
rdata.i1 = rdata.i2 = 0;
|
||||
if(rdata.str) free(rdata.str);
|
||||
if(rdata.str) HDfree(rdata.str);
|
||||
|
||||
if(H5Dread(dset_id, dup_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0) {
|
||||
H5_FAILED(); AT();
|
||||
@@ -1804,7 +1804,7 @@ test_compound_9(void)
|
||||
goto error;
|
||||
} /* end if */
|
||||
|
||||
if(rdata.str) free(rdata.str);
|
||||
if(rdata.str) HDfree(rdata.str);
|
||||
|
||||
if(H5Dclose(dset_id) < 0)
|
||||
goto error;
|
||||
@@ -1983,10 +1983,10 @@ test_compound_10(void)
|
||||
goto error;
|
||||
}
|
||||
|
||||
free(t1);
|
||||
free(t2);
|
||||
free(wdata[i].str);
|
||||
free(rdata[i].str);
|
||||
HDfree(t1);
|
||||
HDfree(t2);
|
||||
HDfree(wdata[i].str);
|
||||
HDfree(rdata[i].str);
|
||||
} /* end for */
|
||||
|
||||
if(H5Dclose(dset_id) < 0)
|
||||
@@ -4547,7 +4547,7 @@ test_conv_enum_2(void)
|
||||
H5Tenum_insert(dsttype, mname[i], &i);
|
||||
|
||||
/* Source data */
|
||||
data = (int*)malloc(NTESTELEM*sizeof(int));
|
||||
data = (int*)HDmalloc(NTESTELEM*sizeof(int));
|
||||
for (i=0; i<NTESTELEM; i++) {
|
||||
((char*)data)[i*3+2] = (char)(i % 8);
|
||||
((char*)data)[i*3+0] = 0;
|
||||
@@ -4569,7 +4569,7 @@ test_conv_enum_2(void)
|
||||
}
|
||||
|
||||
/* Cleanup */
|
||||
free(data);
|
||||
HDfree(data);
|
||||
H5Tclose(srctype);
|
||||
H5Tclose(dsttype);
|
||||
H5Tclose(oddsize);
|
||||
@@ -5387,7 +5387,7 @@ test_encode(void)
|
||||
printf("Can't close datatype\n");
|
||||
goto error;
|
||||
} /* end if */
|
||||
free(cmpd_buf);
|
||||
HDfree(cmpd_buf);
|
||||
cmpd_buf_size = 0;
|
||||
|
||||
/* Commit enumeration datatype and close it */
|
||||
@@ -5406,7 +5406,7 @@ test_encode(void)
|
||||
printf("Can't close datatype\n");
|
||||
goto error;
|
||||
} /* end if */
|
||||
free(enum_buf);
|
||||
HDfree(enum_buf);
|
||||
enum_buf_size = 0;
|
||||
|
||||
/* Commit enumeration datatype and close it */
|
||||
@@ -5425,7 +5425,7 @@ test_encode(void)
|
||||
printf("Can't close datatype\n");
|
||||
goto error;
|
||||
} /* end if */
|
||||
free(vlstr_buf);
|
||||
HDfree(vlstr_buf);
|
||||
vlstr_buf_size = 0;
|
||||
|
||||
/* Open the dataytpe for query */
|
||||
@@ -5543,7 +5543,7 @@ test_encode(void)
|
||||
printf("Can't decode VL string type\n");
|
||||
goto error;
|
||||
} /* end if */
|
||||
free(vlstr_buf);
|
||||
HDfree(vlstr_buf);
|
||||
|
||||
/* Verify that the datatype was copied exactly */
|
||||
if(H5Tequal(decoded_tid3, tid3)<=0) {
|
||||
@@ -5656,8 +5656,8 @@ test_encode(void)
|
||||
goto error;
|
||||
} /* end if */
|
||||
|
||||
free(cmpd_buf);
|
||||
free(enum_buf);
|
||||
HDfree(cmpd_buf);
|
||||
HDfree(enum_buf);
|
||||
|
||||
PASSED();
|
||||
return 0;
|
||||
@@ -7062,7 +7062,7 @@ test_utf_ascii_conv(void)
|
||||
char *ascii_r = NULL;
|
||||
const char *ascii_w = "bar!";
|
||||
char *utf8_r = NULL;
|
||||
|
||||
char filename[1024];
|
||||
char ascii2[4], utf8_2[4];
|
||||
herr_t status;
|
||||
|
||||
@@ -7095,7 +7095,8 @@ test_utf_ascii_conv(void)
|
||||
FAIL_STACK_ERROR
|
||||
|
||||
/* Create a file */
|
||||
if((fid = H5Fcreate(FILENAME[10], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
|
||||
h5_fixname(FILENAME[10], H5P_DEFAULT, filename, sizeof filename);
|
||||
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
|
||||
|
||||
/* Create a scalar dataspace for the dataset */
|
||||
if((sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR
|
||||
|
||||
Reference in New Issue
Block a user