diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 5 | ||||
-rw-r--r-- | src/H5B.c | 2 | ||||
-rw-r--r-- | src/H5F.c | 2 | ||||
-rw-r--r-- | src/H5FDstdio.c | 8 | ||||
-rw-r--r-- | src/H5FLprivate.h | 2 | ||||
-rw-r--r-- | src/H5P.c | 2 | ||||
-rw-r--r-- | src/H5Pprivate.h | 4 | ||||
-rw-r--r-- | src/H5T.c | 4 | ||||
-rw-r--r-- | src/H5TB.c | 2 | ||||
-rw-r--r-- | src/H5V.c | 6 |
10 files changed, 17 insertions, 20 deletions
@@ -35,11 +35,6 @@ #include <sys/resource.h> #endif -/* We need this on Irix64 even though we've included stdio.h as documented */ -#if !defined __MWERKS__ -FILE *fdopen(int fd, const char *mode); -#endif - #define PABLO_MASK H5_mask /* statically initialize block for pthread_once call used in initializing */ @@ -2054,7 +2054,7 @@ H5B_copy(H5F_t *f, const H5B_t *old_bt) H5B_t *ret_value = NULL; hsize_t total_native_keysize; hsize_t size; - unsigned nkeys; + size_t nkeys; unsigned u; FUNC_ENTER(H5B_copy, NULL); @@ -2561,7 +2561,7 @@ H5F_get_fileno(const H5F_t *f, unsigned long *filenum) /* Retrieve the file's serial number */ if(H5FD_get_fileno(f->shared->lf,filenum)<0) - HRETURN_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno"); + HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno"); done: FUNC_LEAVE(ret_value); diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 3b9c300..cf93505 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -16,13 +16,15 @@ #include <stdlib.h> #include <sys/stat.h> +#include "hdf5.h" + +#ifdef H5_HAVE_STDIO_H +#include <stdio.h> +#endif #ifdef H5_HAVE_UNISTD_H #include <unistd.h> #endif - -#include "hdf5.h" - #ifdef WIN32 #include <windows.h> #include <io.h> diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h index 7c2ee98..980e614 100644 --- a/src/H5FLprivate.h +++ b/src/H5FLprivate.h @@ -151,7 +151,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 @@ -4867,7 +4867,7 @@ static herr_t H5P_register(H5P_genclass_t *pclass, const char *name, size_t size */ if(pclass->plists>0 || pclass->classes>0) { if((new_class=H5P_create_class(pclass->parent,pclass->name,pclass->hashsize, - (unsigned)pclass->internal,pclass->create_func,pclass->create_data, + pclass->internal,pclass->create_func,pclass->create_data, pclass->close_func,pclass->close_data))==NULL) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy class"); diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 3b634c2..8f124c2 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -63,8 +63,8 @@ typedef struct H5P_genclass_tag { 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:1; /* Whether this class is internal to the library or not */ - unsigned deleted:1; /* Whether this class has been deleted and is waiting for dependent classes & proplists to close */ + 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 */ /* Callback function pointers & info */ H5P_cls_create_func_t create_func; /* Function to call when a property list is created */ @@ -2219,7 +2219,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"); } @@ -3432,7 +3432,7 @@ H5Tget_member_index(hid_t type_id, const char *name) int ret_value = FAIL; int nmembs, i; - FUNC_ENTER(H5Tget_member_index, NULL); + FUNC_ENTER(H5Tget_member_index, FAIL); H5TRACE2("Is","is",type_id,name); /* Check arguments */ @@ -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) ) @@ -294,7 +294,7 @@ H5V_hyper_stride(unsigned n, const hsize_t *size, default: /* others */ for (i=(int)(n-2), acc=1; i>=0; --i) { - hsize_t tmp = acc * (total_size[i+1] - size[i+1]); + tmp = acc * (total_size[i+1] - size[i+1]); assert (tmp<((hsize_t)1<<(8*sizeof(hssize_t)-1))); stride[i] = (hssize_t)tmp; /*overflow checked*/ acc *= total_size[i+1]; @@ -633,8 +633,8 @@ H5V_hyper_copy(unsigned n, const hsize_t *_size, default: /* others */ for (ii=(int)(n-2), dst_acc=1, src_acc=1; ii>=0; --ii) { - hsize_t tmp1 = dst_acc * (dst_size[ii+1] - size[ii+1]); - hsize_t tmp2 = src_acc * (src_size[ii+1] - size[ii+1]); + tmp1 = dst_acc * (dst_size[ii+1] - size[ii+1]); + tmp2 = src_acc * (src_size[ii+1] - size[ii+1]); assert (tmp1<((hsize_t)1<<(8*sizeof(hssize_t)-1))); assert (tmp2<((hsize_t)1<<(8*sizeof(hssize_t)-1))); dst_stride[ii] = (hssize_t)tmp1; /*overflow checked*/ |