summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Sf.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-10-21 13:08:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-10-21 13:08:44 (GMT)
commitba665404620b16f0e5140c5f1d19b18ffb68590e (patch)
tree8759a98880bc6b7fc7cc1b1612f6548207837cef /fortran/src/H5Sf.c
parent9e2fff4540bbbc1718e1395f101973800f706eb9 (diff)
downloadhdf5-ba665404620b16f0e5140c5f1d19b18ffb68590e.zip
hdf5-ba665404620b16f0e5140c5f1d19b18ffb68590e.tar.gz
hdf5-ba665404620b16f0e5140c5f1d19b18ffb68590e.tar.bz2
[svn-r19654] Description:
Bring Coverity revisions from branch back to trunk, and clean up some other misc. compiler warnings also. r19500: Fix coverity items 1446 and 1447. Moved up calls to memset in test_cont in ohdr.c so the test never tries to close uninitialized locations. r19501: Fix coverity items 1398-1445. Various uninitialized variable errors in fheap.c. r19502: Fixed coverity issue 579 and some additional warnings in the file as well. r19503: Bug fix: This fix addressed the "RESOURCE_LEAK" problems #789 and 790, run 26 r19504: minor mods to try to keep coverity from flagging false positives. r19505: Fixed coverity issues 566 - 571. Declared variables that are passed to functions that use them as arrays to be arrays of size 1. Tested on: Mac OS X/32 10.6.4 (amazon) w/debug, production & parallel (h5committested on trunk)
Diffstat (limited to 'fortran/src/H5Sf.c')
-rw-r--r--fortran/src/H5Sf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index dea3ff0..e161618 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -989,7 +989,7 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi
c_space_id = *space_id;
rank = H5Sget_simple_extent_ndims(c_space_id);
- c_coord = malloc(sizeof(hsize_t)*rank*(*nelements));
+ c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank*(*nelements));
if(!c_coord) return ret_value;
for (i=0; i< *nelements; i++) {
for (j = 0; j < rank; j++) {
@@ -1080,7 +1080,7 @@ nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
/*
* Allocate buffer
*/
- if ((c_buf = HDmalloc(c_size)) == NULL)
+ if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
return ret_value;
/*
* Call H5Sencode function.