summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2002-05-22 20:01:29 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2002-05-22 20:01:29 (GMT)
commitb4ad5aae56cbfba6e7438f4a129ba5b3a23b513d (patch)
treef94b4ccd77d3fe78ab637dec968b19368b1212a0 /src/H5Tconv.c
parentd11c3a233fcf4f73538f2fab4c3c7cf4938757bd (diff)
downloadhdf5-b4ad5aae56cbfba6e7438f4a129ba5b3a23b513d.zip
hdf5-b4ad5aae56cbfba6e7438f4a129ba5b3a23b513d.tar.gz
hdf5-b4ad5aae56cbfba6e7438f4a129ba5b3a23b513d.tar.bz2
[svn-r5452]
Purpose: eliminating the compiler warnings in Windows Solution: I am eliminating the compiler warnings in Windows. the last 2 were: 1) if((oid_list = H5MM_malloc(oid_count*sizeof(hid_t)))==NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); D:\disk_w\hdf5\src\H5F.c(2590) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *' on the HGOTO_ERROR call , I replaced the NULL with FAIL 2) *((float*)d) = *((double*)s); D:\disk_w\hdf5\src\H5Tconv.c(6426) : warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data I added the type cast *((float*)d) = (float) *((double*)s); we have now 0 errors 0 warnings on Windows ! Platforms tested: w2000, linux
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index a32efa4..7a01133 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -6423,7 +6423,7 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
*((float*)d) = -FLT_MAX;
}
} else {
- *((float*)d) = *((double*)s);
+ *((float*)d) = (float) *((double*)s);
}
/* Unalign destination */