diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-08-13 09:23:53 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-08-13 09:23:53 (GMT) |
commit | f40381b0eab242182a02b0bb97aed88b37095086 (patch) | |
tree | 600c15466f4bbb9576ccc78f82287e5e6c78612b /test/dtypes.c | |
parent | ae0b7490126e45e312b63a27b499e5a25e402f40 (diff) | |
download | hdf5-f40381b0eab242182a02b0bb97aed88b37095086.zip hdf5-f40381b0eab242182a02b0bb97aed88b37095086.tar.gz hdf5-f40381b0eab242182a02b0bb97aed88b37095086.tar.bz2 |
[svn-r30285] Description:
More warning cleanups, bringing the build down to 25 unique types of
warnings, with 550 warnings in 122 files (down from 28, 770, and 134).
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial & parallel
(h5committest forthcoming)
Diffstat (limited to 'test/dtypes.c')
-rw-r--r-- | test/dtypes.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/dtypes.c b/test/dtypes.c index 255ef8e..f247bd9 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -1925,12 +1925,12 @@ test_compound_10(void) for(i=0; i<ARRAY_DIM; i++) { wdata[i].i1 = i*10+i; wdata[i].str = HDstrdup("C string A"); - wdata[i].str[9] += (char)i; + wdata[i].str[9] = (char)(wdata[i].str[9] + i); wdata[i].i2 = i*1000+i*10; wdata[i].text.p = (void*)HDstrdup("variable-length text A\0"); len = wdata[i].text.len = HDstrlen((char*)wdata[i].text.p)+1; - ((char*)(wdata[i].text.p))[len-2] += (char)i; + ((char *)(wdata[i].text.p))[len - 2] = (char)(((char *)(wdata[i].text.p))[len - 2] + i); ((char*)(wdata[i].text.p))[len-1] = '\0'; } @@ -2183,7 +2183,7 @@ test_compound_11(void) /* Verify converted buffer is correct */ for(u=0; u<NTESTELEM; u++) { - if(((big_t *)buf_orig)[u].d1!=((little_t *)buf)[u].d1) { + if(!H5_DBL_ABS_EQUAL(((big_t *)buf_orig)[u].d1, ((little_t *)buf)[u].d1)) { printf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n",__LINE__, (unsigned)u,((big_t *)buf_orig)[u].d1,(unsigned)u,((little_t *)buf)[u].d1); TEST_ERROR @@ -2227,7 +2227,7 @@ test_compound_11(void) /* Verify converted buffer is correct */ for(u=0; u<NTESTELEM; u++) { - if(((big_t *)buf_orig)[u].d1!=((little_t *)buf)[u].d1) { + if(!H5_DBL_ABS_EQUAL(((big_t *)buf_orig)[u].d1, ((little_t *)buf)[u].d1)) { printf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n",__LINE__, (unsigned)u,((big_t *)buf_orig)[u].d1,(unsigned)u,((little_t *)buf)[u].d1); TEST_ERROR @@ -2265,7 +2265,7 @@ test_compound_11(void) /* Verify converted buffer is correct */ for(u=0; u<NTESTELEM; u++) { - if(((big_t *)buf_orig)[u].d1!=((little_t *)buf)[u].d1) { + if(!H5_DBL_ABS_EQUAL(((big_t *)buf_orig)[u].d1, ((little_t *)buf)[u].d1)) { printf("Error, line #%d: buf_orig[%u].d1=%f, buf[%u].d1=%f\n",__LINE__, (unsigned)u,((big_t *)buf_orig)[u].d1,(unsigned)u,((little_t *)buf)[u].d1); TEST_ERROR @@ -2487,7 +2487,7 @@ test_compound_13(void) /* Check the data. */ for (u = 0; u < COMPOUND13_ARRAY_SIZE + 1; u++) if(data_out.x[u] != data_in.x[u]) TEST_ERROR - if(data_out.y != data_in.y) TEST_ERROR + if(!H5_FLT_ABS_EQUAL(data_out.y, data_in.y)) TEST_ERROR /* Release all resources. */ if(H5Aclose(attid) < 0) FAIL_STACK_ERROR @@ -6113,7 +6113,7 @@ test_int_float_except(void) /* Check the buffer after conversion, as floats */ for(u = 0; u < CONVERT_SIZE; u++) { floatp = (float *)&buf[u]; - if(*floatp != buf_float[u]) TEST_ERROR + if(!H5_FLT_ABS_EQUAL(*floatp, buf_float[u])) TEST_ERROR } /* end for */ /* Check for proper exceptions */ @@ -6134,7 +6134,7 @@ test_int_float_except(void) /* Check the buffer after conversion, as floats */ for(u = 0; u < CONVERT_SIZE; u++) { floatp = (float *)&buf2[u]; - if(*floatp != buf2_float[u]) TEST_ERROR + if(!H5_FLT_ABS_EQUAL(*floatp, buf2_float[u])) TEST_ERROR } /* end for */ /* Check for proper exceptions */ |