diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-02-17 02:51:21 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-02-17 02:51:21 (GMT) |
commit | b8dbd390db9b47e73c6120ba61724b1e20ab333d (patch) | |
tree | 1fbcef76bf2cc480c2a57e5e26b599f82d85bc7c /src | |
parent | 855aa23823a1091262524773626de3d920838e72 (diff) | |
download | hdf5-b8dbd390db9b47e73c6120ba61724b1e20ab333d.zip hdf5-b8dbd390db9b47e73c6120ba61724b1e20ab333d.tar.gz hdf5-b8dbd390db9b47e73c6120ba61724b1e20ab333d.tar.bz2 |
[svn-r4978] Purpose:
Code cleanup
Description:
Cleanup compiler warnings found by the SGI compiler and gcc 3.0
Platforms tested:
FreeBSD 4.5 w/gcc 3.0 (hack) && IRIX64 (modi4)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 2 | ||||
-rw-r--r-- | src/H5FDfamily.c | 4 | ||||
-rw-r--r-- | src/H5FLprivate.h | 2 | ||||
-rw-r--r-- | src/H5P.c | 3 | ||||
-rw-r--r-- | src/H5Sall.c | 4 | ||||
-rw-r--r-- | src/H5T.c | 3 | ||||
-rw-r--r-- | src/H5TB.c | 2 |
7 files changed, 8 insertions, 12 deletions
@@ -2123,7 +2123,7 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } } else { hobj_ref_t ref = va_arg (ap, hobj_ref_t); - fprintf (out, "Reference Object=%p", &ref); + fprintf (out, "Reference Object=%p", (void *)&ref); } break; diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 16c2265..3f40b22 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -876,7 +876,7 @@ H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si * list does not belong to this driver then assume defaults */ if(NULL == (plist = H5I_object(dxpl_id))) - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_DEFAULT!=dxpl_id && H5FD_FAMILY==H5P_get_driver(plist)) { H5FD_family_dxpl_t *dx = H5P_get_driver_info(plist); @@ -954,7 +954,7 @@ H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s * list does not belong to this driver then assume defaults. */ if(NULL == (plist = H5I_object(dxpl_id))) - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); if (H5P_DEFAULT!=dxpl_id && H5FD_FAMILY==H5P_get_driver(plist)) { H5FD_family_dxpl_t *dx = H5P_get_driver_info(plist); diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h index ff89487..e531d0c 100644 --- a/src/H5FLprivate.h +++ b/src/H5FLprivate.h @@ -140,7 +140,7 @@ typedef struct H5FL_arr_head_t { * Macros for defining & using free lists for an array of a type */ /* Declare a free list to manage arrays of type 't' */ -#define H5FL_ARR_DEFINE(t,m) H5FL_arr_head_t t##_arr_free_list={0,0,NULL,0,#t##"_arr",m+1,sizeof(t),{NULL}} +#define H5FL_ARR_DEFINE(t,m) H5FL_arr_head_t t##_arr_free_list={0,0,NULL,0,#t"_arr",m+1,sizeof(t),{NULL}} /* Reference a free list for arrays of type 't' defined in another file */ #define H5FL_ARR_EXTERN(t) extern H5FL_arr_head_t t##_arr_free_list @@ -4717,9 +4717,6 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, unsigned hashsize, ) { H5P_genclass_t *pclass; /* Property list class created */ - H5P_genprop_t *tmp; /* Temporary pointer to parent class properties */ - H5P_genprop_t *pcopy; /* Copy of property to insert into class */ - unsigned u; /* Local index variable */ H5P_genclass_t *ret_value=NULL; /* return value */ FUNC_ENTER (H5P_create_class, NULL); diff --git a/src/H5Sall.c b/src/H5Sall.c index 76fe0d6..3c111f7 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -632,7 +632,7 @@ for (u=0; u<=mem_space->extent.u.simple.rank; u++) *must_convert = FALSE; done: - FUNC_LEAVE(SUCCEED); + FUNC_LEAVE(ret_value); } @@ -892,7 +892,7 @@ H5S_all_write(H5F_t *f, const struct H5O_layout_t *layout, done: - FUNC_LEAVE(SUCCEED); + FUNC_LEAVE(ret_value); } @@ -2637,7 +2637,6 @@ H5T_detect_class (H5T_t *dt, H5T_class_t cls) case H5T_VLEN: case H5T_ENUM: HRETURN(H5T_detect_class(dt->parent,cls)); - break; default: break; @@ -2891,7 +2890,7 @@ H5Tget_precision(hid_t type_id) } if (dt->parent) dt = dt->parent; /*defer to parent*/ if (H5T_COMPOUND==dt->type || H5T_OPAQUE==dt->type || H5T_ARRAY==dt->type) { - HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_ORDER_ERROR, + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, 0, "operation not defined for specified data type"); } @@ -65,7 +65,7 @@ #include "H5TBprivate.h" /*Threaded, balanced, binary trees */ # define KEYcmp(k1,k2,a) ((NULL!=compar) ? (*compar)( k1, k2, a) \ - : HDmemcmp( k1, k2, 0<(a) ? (a) : HDstrlen(k1) ) ) + : HDmemcmp( k1, k2, 0<(a) ? ((size_t)a) : HDstrlen(k1) ) ) /* Return maximum of two scalar values (use arguments w/o side effects): */ #define Max(a,b) ( (a) > (b) ? (a) : (b) ) |