diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-02-27 20:08:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-02-27 20:08:03 (GMT) |
commit | d3a9b81fd06423cb81c8f4fa49f2e4c265a9c3d0 (patch) | |
tree | 31816c1a7204c609ae6e7ea3e8b99ce518eaad87 /src/H5Ppkg.h | |
parent | c90711e71362716cd9ab25d6b9167ca49edccfe8 (diff) | |
download | hdf5-d3a9b81fd06423cb81c8f4fa49f2e4c265a9c3d0.zip hdf5-d3a9b81fd06423cb81c8f4fa49f2e4c265a9c3d0.tar.gz hdf5-d3a9b81fd06423cb81c8f4fa49f2e4c265a9c3d0.tar.bz2 |
[svn-r18346] Description:
Bring Coverity fixes back from branch to trunk:
r18336:
Fix coverity issues 275, 276, 277, 323, 432, 433, and 434
r18337:
Fix Coverity issue #106: release free space section node on error
r18338:
Fixed Coverity #94 - In H5P_register, new_class wasn't closed when there's an
error after it's created.
r18339:
Fix Coverity #185 - In test_conv_str_1, BUF wasn't freed when there's an error
in this function.
r18340:
Correct error in r18337 that wasn't releasing indirect fractal heap block
early enough.
r18341:
Close nodes if any failed in the middle of allocating new nodes. Coverity 140
and 141
r18342:
Correct [another] problem w/r18337.
r18343:
Fix coverity items 185, 20, and 21.
r18344:
Fix Coverity 213 - In H5FD_family_close, the double pointer file->memb was
dereferenced without NULL checking
(We believe).
r18345:
Fix Coverity issue # 210; removed NULL check after pointer dereferenced in
H5HFdblock.c. Also assigned NULL to pointer in H5Pint.c to fix segmentation
fault.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5Ppkg.h')
-rw-r--r-- | src/H5Ppkg.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index fd9c65a..1e71049 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -69,7 +69,7 @@ typedef struct H5P_genprop_t { size_t size; /* Size of property value */ void *value; /* Pointer to property value */ H5P_prop_within_t type; /* Type of object the property is within */ - unsigned shared_name; /* Boolean: whether the name is shared or not */ + hbool_t shared_name; /* Whether the name is shared or not */ /* Callback function pointers & info */ H5P_prp_create_func_t create; /* Function to call when a property is created */ @@ -89,8 +89,8 @@ struct H5P_genclass_t { unsigned plists; /* Number of property lists that have been created since the last modification to the class */ unsigned classes; /* Number of classes that have been derived since the last modification to the class */ unsigned ref_count; /* Number of oustanding ID's open on this class object */ - unsigned internal; /* Whether this class is internal to the library or not */ - unsigned deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists to close */ + hbool_t internal; /* Whether this class is internal to the library or not */ + hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists to close */ unsigned revision; /* Revision number of a particular class (global) */ H5SL_t *props; /* Skip list containing properties */ @@ -106,9 +106,9 @@ struct H5P_genclass_t { /* Define structure to hold property list information */ struct H5P_genplist_t { H5P_genclass_t *pclass; /* Pointer to class info */ - hid_t plist_id; /* Copy of the property list ID (for use in close callback) */ - size_t nprops; /* Number of properties in class */ - unsigned class_init:1; /* Whether the class initialization callback finished successfully */ + hid_t plist_id; /* Copy of the property list ID (for use in close callback) */ + size_t nprops; /* Number of properties in class */ + hbool_t class_init; /* Whether the class initialization callback finished successfully */ H5SL_t *del; /* Skip list containing names of deleted properties */ H5SL_t *props; /* Skip list containing properties */ }; @@ -155,6 +155,16 @@ H5_DLL H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class, H5P_cls_copy_func_t cls_copy, void *copy_data, H5P_cls_close_func_t cls_close, void *close_data); H5_DLL H5P_genclass_t *H5P_copy_pclass(H5P_genclass_t *pclass); +H5_DLL herr_t H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size, + const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, + H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, + H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, + H5P_prp_close_func_t prp_close); +H5_DLL herr_t H5P_register(H5P_genclass_t **pclass, const char *name, size_t size, + const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, + H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, + H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, + H5P_prp_close_func_t prp_close); H5_DLL herr_t H5P_add_prop(H5SL_t *props, H5P_genprop_t *prop); H5_DLL herr_t H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod); H5_DLL htri_t H5P_exist_pclass(H5P_genclass_t *pclass, const char *name); @@ -171,8 +181,7 @@ H5_DLL int H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func, H5_DLL int H5P_iterate_pclass(hid_t pclass_id, int *idx, H5P_iterate_t iter_func, void *iter_data); H5_DLL herr_t H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name); -H5_DLL herr_t H5P_copy_prop_pclass(H5P_genclass_t *dst_pclass, H5P_genclass_t *src_pclass, - const char *name); +H5_DLL herr_t H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name); H5_DLL herr_t H5P_unregister(H5P_genclass_t *pclass, const char *name); H5_DLL char *H5P_get_class_path(H5P_genclass_t *pclass); H5_DLL H5P_genclass_t *H5P_open_class_path(const char *path); |