diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-05-11 15:59:48 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-05-11 15:59:48 (GMT) |
commit | d38fe20df6bdb30906b18cf01ee644c44ed5b944 (patch) | |
tree | f9ebbcca3baaf76c5e4c4bcc5139e551cf3d6a0c /src/H5R.c | |
parent | 5ecebe5b9bc161153a3391bf32eb64687f675172 (diff) | |
download | hdf5-d38fe20df6bdb30906b18cf01ee644c44ed5b944.zip hdf5-d38fe20df6bdb30906b18cf01ee644c44ed5b944.tar.gz hdf5-d38fe20df6bdb30906b18cf01ee644c44ed5b944.tar.bz2 |
[svn-r23695] Description:
Clean up warnings in H5Tconv.c (down to _only_ 9000 lines of output now!)
Merge changes from Coverity branch back to trunk:
r20684:
Fix for coverity bug #1721 which was due to the fix for coverity bug #943.
r20685:
Use HDstrncpy. --gh
r20761:
Purpose: Fix valgrind issues
Description:
Free image_data and data as appropriate in test_image.
r20762:
Purpose: Fix coverity issue 600
Description:
Add check for return value of H5O_close in H5Ocopy. Also cleaned up various
warnings.
r20763:
Purpose: Fix valgrind issues with h5stat
Description:
Modified h5stat to free "iter" before exit, and free "hand" before exit if
parse_command_line exits directly.
r20764:
fixed coverity issues:
69, 327, 614, 684, 685, 696, 697, 1681, 967, 826, 660, 80
r20765:
Fixed coverity bug 668
Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning.
No actual integer overflow tests are performed since it's just a test program but I did add a check that n_elements is >= 1.
I also changed an error condition from doing its own close and returning -1 to "goto out;" like the rest of the program.
r20766:
Fixed coverity bug 667
Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning.
No actual integer overflow tests are performed since it's just a test program.
Tested on:
Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
(h5committest upcoming)
Diffstat (limited to 'src/H5R.c')
-rw-r--r-- | src/H5R.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -295,7 +295,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 /* Serialize the heap ID and index for storage in the file */ p = (uint8_t *)ref; H5F_addr_encode(loc->oloc->file, &p, hobjid.addr); - INT32ENCODE(p, hobjid.idx); + UINT32ENCODE(p, hobjid.idx); /* Free the buffer we serialized data in */ H5MM_xfree(buf); @@ -439,7 +439,7 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type, /* Get the heap ID for the dataset region */ p = (const uint8_t *)_ref; H5F_addr_decode(oloc.file, &p, &(hobjid.addr)); - INT32DECODE(p, hobjid.idx); + UINT32DECODE(p, hobjid.idx); /* Get the dataset region from the heap (allocate inside routine) */ if(NULL == (buf = (uint8_t *)H5HG_read(oloc.file, dxpl_id, &hobjid, NULL, NULL))) @@ -637,7 +637,7 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref) /* Get the heap ID for the dataset region */ p = (const uint8_t *)_ref; H5F_addr_decode(oloc.file, &p, &(hobjid.addr)); - INT32DECODE(p, hobjid.idx); + UINT32DECODE(p, hobjid.idx); /* Get the dataset region from the heap (allocate inside routine) */ if((buf = (uint8_t *)H5HG_read(oloc.file, dxpl_id, &hobjid, NULL, NULL)) == NULL) @@ -772,7 +772,7 @@ H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, /* Get the heap ID for the dataset region */ p = (const uint8_t *)_ref; H5F_addr_decode(oloc.file, &p, &(hobjid.addr)); - INT32DECODE(p, hobjid.idx); + UINT32DECODE(p, hobjid.idx); /* Get the dataset region from the heap (allocate inside routine) */ if((buf = (uint8_t *)H5HG_read(oloc.file, dxpl_id, &hobjid, NULL, NULL)) == NULL) @@ -916,7 +916,7 @@ H5R_get_name(H5F_t *f, hid_t lapl_id, hid_t dxpl_id, hid_t id, H5R_type_t ref_ty /* Get the heap ID for the dataset region */ p = (const uint8_t *)_ref; H5F_addr_decode(oloc.file, &p, &(hobjid.addr)); - INT32DECODE(p, hobjid.idx); + UINT32DECODE(p, hobjid.idx); /* Get the dataset region from the heap (allocate inside routine) */ if((buf = (uint8_t *)H5HG_read(oloc.file, dxpl_id, &hobjid, NULL, NULL)) == NULL) |