diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-07-22 22:43:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-07-22 22:43:18 (GMT) |
commit | 4af66b09e03af4e9b0b6a1293dfe746f48106aba (patch) | |
tree | 0cb162e0921a0a774a433f9d3cd9f08c44bbe57d /test/dt_arith.c | |
parent | 9b597a48552f5201b37793a4c6fece4fd9f1c346 (diff) | |
download | hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.zip hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.gz hdf5-4af66b09e03af4e9b0b6a1293dfe746f48106aba.tar.bz2 |
[svn-r30219] Description:
More warning cleaups: down to 770 warnings (from ~940) in 134 files (from
148), with 28 unique kinds of warnings (from 31).
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial & parallel
(h5committest forthcoming)
Diffstat (limited to 'test/dt_arith.c')
-rw-r--r-- | test/dt_arith.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c index 639ad52..e258b77 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -3094,8 +3094,8 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) if (FLT_FLOAT==dst_type) { hw_f = (float)(*((double*)aligned)); hw = (unsigned char*)&hw_f; - underflow = HDfabs(*((double*)aligned)) < FLT_MIN; - overflow = HDfabs(*((double*)aligned)) > FLT_MAX; + underflow = HDfabs(*((double*)aligned)) < (double)FLT_MIN; + overflow = HDfabs(*((double*)aligned)) > (double)FLT_MAX; } else if (FLT_DOUBLE==dst_type) { hw_d = *((double*)aligned); hw = (unsigned char*)&hw_d; @@ -3109,12 +3109,12 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) } else { HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double)); if (FLT_FLOAT==dst_type) { - hw_f = *((long double*)aligned); + hw_f = (float)*((long double*)aligned); hw = (unsigned char*)&hw_f; underflow = HDfabsl(*((long double*)aligned)) < FLT_MIN; overflow = HDfabsl(*((long double*)aligned)) > FLT_MAX; } else if (FLT_DOUBLE==dst_type) { - hw_d = *((long double*)aligned); + hw_d = (double)*((long double*)aligned); hw = (unsigned char*)&hw_d; underflow = HDfabsl(*((long double*)aligned)) < DBL_MIN; overflow = HDfabsl(*((long double*)aligned)) > DBL_MAX; @@ -3227,15 +3227,15 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) long double x; HDmemcpy(&x, &buf[j*dst_size], sizeof(long double)); /* dst is largest float, no need to check underflow. */ - check_mant[0] = HDfrexpl(x, check_expo+0); - check_mant[1] = HDfrexpl(hw_ld, check_expo+1); + check_mant[0] = (double)HDfrexpl(x, check_expo+0); + check_mant[1] = (double)HDfrexpl(hw_ld, check_expo+1); #endif } /* Special check for denormalized values */ if(check_expo[0]<(-(int)dst_ebias) || check_expo[1]<(-(int)dst_ebias)) { - int expo_diff=check_expo[0]-check_expo[1]; - int valid_bits=(int)((dst_ebias+dst_msize)+MIN(check_expo[0],check_expo[1]))-1; - double epsilon=1.0F; + int expo_diff = check_expo[0] - check_expo[1]; + int valid_bits = (int)((dst_ebias + dst_msize) + (size_t)MIN(check_expo[0], check_expo[1])) - 1; + double epsilon = 1.0F; /* Re-scale the mantissas based on any exponent difference */ if(expo_diff!=0) @@ -3249,8 +3249,8 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) continue; } /* end if */ else { - if (check_expo[0]==check_expo[1] && - HDfabs(check_mant[0]-check_mant[1])<FP_EPSILON) + if(check_expo[0] == check_expo[1] && + HDfabs(check_mant[0] - check_mant[1]) < (double)FP_EPSILON) continue; } /* end else */ } @@ -4217,10 +4217,10 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) */ #if H5_SIZEOF_LONG_DOUBLE !=0 if(dendian==H5T_ORDER_LE && dst_type==FLT_LDOUBLE) { - unsigned int q; - for(q=dst_nbits/8; q<dst_size; q++) { - buf[j*dst_size+q] = 0x00; - } + size_t q; + + for(q = dst_nbits / 8; q < dst_size; q++) + buf[j * dst_size + q] = 0x00; } #endif |