From 7438609ee2a445521b461faa122554b253283f51 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 19 Apr 2000 18:11:06 -0500 Subject: [svn-r2162] Various small fixes to address SGI compiler warnings. --- src/H5Distore.c | 4 ++-- src/H5F.c | 6 ++++-- src/H5Fistore.c | 4 ++-- src/H5P.c | 6 +----- src/Makefile.in | 4 ++-- src/hdf5.h | 2 ++ tools/h5dumptst.c | 3 ++- tools/h5tools.c | 6 ++++++ 8 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/H5Distore.c b/src/H5Distore.c index 8339e30..cd9acac 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -1502,7 +1502,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, { H5F_xfer_t *dxpl; - dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : H5I_object(dxpl_id); + dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : (H5F_xfer_t *)H5I_object(dxpl_id); ent->split_ratios[0] = dxpl->split_ratios[0]; ent->split_ratios[1] = dxpl->split_ratios[1]; ent->split_ratios[2] = dxpl->split_ratios[2]; @@ -1644,7 +1644,7 @@ H5F_istore_unlock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, x.chunk = chunk; { H5F_xfer_t *dxpl; - dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : H5I_object(dxpl_id); + dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : (H5F_xfer_t *)H5I_object(dxpl_id); x.split_ratios[0] = dxpl->split_ratios[0]; x.split_ratios[1] = dxpl->split_ratios[1]; x.split_ratios[2] = dxpl->split_ratios[2]; diff --git a/src/H5F.c b/src/H5F.c index eb60325..2ebbf9c 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -31,6 +31,8 @@ static char RcsId[] = "@(#)$Revision$"; #include /*Posix unbuffered I/O */ #include /* Standard C buffered I/O */ +#include /* Custom unbuffered I/O */ + /* Packages needed by this file... */ #include /*library functions */ #include /*attributes */ @@ -727,13 +729,13 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id) * new file handle. We do this early because some values might need * to change as the file is being opened. */ - fcpl = (H5P_DEFAULT==fcpl_id)? &H5F_create_dflt : H5I_object(fcpl_id); + fcpl = (H5P_DEFAULT==fcpl_id)? &H5F_create_dflt : (const H5F_create_t *)H5I_object(fcpl_id); if (NULL==(f->shared->fcpl=H5P_copy(H5P_FILE_CREATE, fcpl))) { HRETURN_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to copy file creation property list"); } - fapl = (H5P_DEFAULT==fapl_id)? &H5F_access_dflt : H5I_object(fapl_id); + fapl = (H5P_DEFAULT==fapl_id)? &H5F_access_dflt : (const H5F_access_t *)H5I_object(fapl_id); f->shared->mdc_nelmts = fapl->mdc_nelmts; f->shared->rdcc_nelmts = fapl->rdcc_nelmts; f->shared->rdcc_nbytes = fapl->rdcc_nbytes; diff --git a/src/H5Fistore.c b/src/H5Fistore.c index 8339e30..cd9acac 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -1502,7 +1502,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, { H5F_xfer_t *dxpl; - dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : H5I_object(dxpl_id); + dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : (H5F_xfer_t *)H5I_object(dxpl_id); ent->split_ratios[0] = dxpl->split_ratios[0]; ent->split_ratios[1] = dxpl->split_ratios[1]; ent->split_ratios[2] = dxpl->split_ratios[2]; @@ -1644,7 +1644,7 @@ H5F_istore_unlock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, x.chunk = chunk; { H5F_xfer_t *dxpl; - dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : H5I_object(dxpl_id); + dxpl = (H5P_DEFAULT==dxpl_id) ? &H5F_xfer_dflt : (H5F_xfer_t *)H5I_object(dxpl_id); x.split_ratios[0] = dxpl->split_ratios[0]; x.split_ratios[1] = dxpl->split_ratios[1]; x.split_ratios[2] = dxpl->split_ratios[2]; diff --git a/src/H5P.c b/src/H5P.c index a22a679..873c258 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -258,17 +258,13 @@ H5P_create(H5P_class_t type, H5P_t *plist) herr_t H5Pclose(hid_t plist_id) { - H5P_class_t type; - void *plist = NULL; - FUNC_ENTER(H5Pclose, FAIL); H5TRACE1("e","i",plist_id); /* Check arguments */ if (plist_id==H5P_DEFAULT) HRETURN(SUCCEED); - if ((type=H5P_get_class (plist_id))<0 || - NULL==(plist=H5I_object (plist_id))) { + if (H5P_get_class (plist_id)<0) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); } diff --git a/src/Makefile.in b/src/Makefile.in index f7f7316..91134ce 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -21,7 +21,7 @@ CLEAN=libhdf5.settings ## Source and object files for the library (lexicographically)... LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5D.c H5E.c H5F.c H5Farray.c H5Fistore.c \ H5FD.c H5FDsec2.c H5FDfamily.c H5FDmpio.c H5FDcore.c H5FDdpss.c H5FDmulti.c\ - H5FDgass.c H5FDsrb.c H5FDstdio.c H5FL.c H5G.c H5Gent.c H5Gnode.c \ + H5FDgass.c H5FDqak.c H5FDsrb.c H5FDstdio.c H5FL.c H5G.c H5Gent.c H5Gnode.c \ H5Gstab.c H5HG.c H5HL.c H5I.c H5MF.c H5MM.c H5O.c H5Oattr.c H5Ocomp.c \ H5Ocont.c H5Odtype.c H5Oefl.c H5Ofill.c H5Olayout.c H5Omtime.c H5Oname.c \ H5Onull.c H5Osdspace.c H5Oshared.c H5Ostab.c H5P.c H5R.c H5RA.c H5S.c \ @@ -37,7 +37,7 @@ MOSTLYCLEAN=H5detect.o H5detect.lo H5detect H5Tinit.o H5Tinit.lo H5Tinit.c ## Public header files (to be installed)... PUB_HDR=H5public.h H5Apublic.h H5ACpublic.h H5Bpublic.h H5Dpublic.h \ H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDdpss.h H5FDfamily.h H5FDgass.h \ - H5FDmpio.h H5FDsec2.h H5FDsrb.h H5FDcore.h H5FDmulti.h H5FDstdio.h \ + H5FDmpio.h H5FDqak.h H5FDsec2.h H5FDsrb.h H5FDcore.h H5FDmulti.h H5FDstdio.h \ H5Gpublic.h H5HGpublic.h H5HLpublic.h H5Ipublic.h H5MMpublic.h \ H5Opublic.h H5Ppublic.h H5Rpublic.h H5RApublic.h H5Spublic.h H5Tpublic.h \ H5Zpublic.h H5pubconf.h hdf5.h H5api_adpt.h diff --git a/src/hdf5.h b/src/hdf5.h index 217d7e0..5f329d2 100644 --- a/src/hdf5.h +++ b/src/hdf5.h @@ -50,4 +50,6 @@ #include /* Remote access using Storage Client API */ #include /* Usage-partitioned file family */ +#include /* Custom POSIX unbuffered file I/O */ + #endif diff --git a/tools/h5dumptst.c b/tools/h5dumptst.c index e48f0b9..85d7825 100644 --- a/tools/h5dumptst.c +++ b/tools/h5dumptst.c @@ -58,6 +58,7 @@ typedef struct s1_t { void test_enum(void); void test_objref(void); void test_datareg(void); +void test_nestcomp(void); @@ -1574,7 +1575,7 @@ void test_datareg(void){ void test_nestcomp(){ hid_t file,space,type,type2,dataset; - int i, maxdim = 5, status = 0; + int i, maxdim = 5, status; hsize_t dim = 5; int y = 1; diff --git a/tools/h5tools.c b/tools/h5tools.c index 9e3f620..58b53ed 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -1365,7 +1365,9 @@ h5dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset, hsize_t hs_size[H5S_MAX_RANK]; /*size this pass */ hsize_t hs_nelmts; /*elements in request */ +#if 0 hsize_t dim_n_size; +#endif /* * Check that everything looks okay. The dimensionality must not be too @@ -1419,12 +1421,16 @@ h5dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset, hs_size, NULL); H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL); +#if 0 dim_n_size = total_size[ctx.ndims-1]; +#endif } else { H5Sselect_all(f_space); H5Sselect_all(sm_space); hs_nelmts = 1; +#if 0 dim_n_size = 1; +#endif } /* Read the data */ -- cgit v0.12