summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.distdep342
-rw-r--r--src/H5A.c2
-rw-r--r--src/H5D.c5
-rw-r--r--src/H5Distore.c3
-rw-r--r--src/H5F.c4
-rw-r--r--src/H5Fistore.c3
-rw-r--r--src/H5Flow.c6
-rw-r--r--src/H5G.c14
-rw-r--r--src/H5I.c2
-rw-r--r--src/H5Ocomp.c2
-rw-r--r--src/H5P.c2
-rw-r--r--src/H5R.c2
-rw-r--r--src/H5RA.c4
-rw-r--r--src/H5T.c6
-rw-r--r--src/H5Tbit.c23
-rw-r--r--src/H5Tconv.c38
-rw-r--r--src/H5Z.c6
-rw-r--r--src/H5detect.c1
18 files changed, 238 insertions, 227 deletions
diff --git a/src/.distdep b/src/.distdep
index 730145a..aa275bb 100644
--- a/src/.distdep
+++ b/src/.distdep
@@ -135,38 +135,6 @@ H5E.o: \
H5config.h \
H5api_adpt.h \
H5Iprivate.h
-H5F.o: \
- H5F.c \
- H5private.h \
- H5public.h \
- H5config.h \
- H5api_adpt.h \
- H5Aprivate.h \
- H5Apublic.h \
- H5Ipublic.h \
- H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Dpublic.h \
- H5Dprivate.h \
- H5Oprivate.h \
- H5Opublic.h \
- H5HGprivate.h \
- H5HGpublic.h \
- H5Tprivate.h \
- H5Tpublic.h \
- H5Sprivate.h \
- H5Spublic.h \
- H5Zprivate.h \
- H5Zpublic.h \
- H5Iprivate.h \
- H5ACprivate.h \
- H5ACpublic.h \
- H5Eprivate.h \
- H5Epublic.h
H5Farray.o: \
H5Farray.c \
H5private.h \
@@ -245,18 +213,6 @@ H5Fistore.o: \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h
-H5Flow.o: \
- H5Flow.c \
- H5private.h \
- H5public.h \
- H5config.h \
- H5api_adpt.h \
- H5Eprivate.h \
- H5Epublic.h \
- H5Ipublic.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Dpublic.h
H5Fmpio.o: \
H5Fmpio.c \
H5private.h \
@@ -320,43 +276,6 @@ H5Fstdio.o: \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h
-H5G.o: \
- H5G.c \
- H5private.h \
- H5public.h \
- H5config.h \
- H5api_adpt.h \
- H5Aprivate.h \
- H5Apublic.h \
- H5Ipublic.h \
- H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Dpublic.h \
- H5Dprivate.h \
- H5Oprivate.h \
- H5Opublic.h \
- H5HGprivate.h \
- H5HGpublic.h \
- H5Tprivate.h \
- H5Tpublic.h \
- H5Sprivate.h \
- H5Spublic.h \
- H5Zprivate.h \
- H5Zpublic.h \
- H5Eprivate.h \
- H5Epublic.h \
- H5Gpkg.h \
- H5ACprivate.h \
- H5ACpublic.h \
- H5HLprivate.h \
- H5HLpublic.h \
- H5Iprivate.h \
- H5MMprivate.h \
- H5MMpublic.h
H5Gent.o: \
H5Gent.c \
H5private.h \
@@ -935,38 +854,6 @@ H5R.o: \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h
-H5RA.o: \
- H5RA.c \
- H5RAprivate.h \
- H5RApublic.h \
- H5Ipublic.h \
- H5public.h \
- H5config.h \
- H5api_adpt.h \
- H5Dprivate.h \
- H5Dpublic.h \
- H5private.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
- H5Oprivate.h \
- H5Opublic.h \
- H5HGprivate.h \
- H5HGpublic.h \
- H5Tprivate.h \
- H5Tpublic.h \
- H5Sprivate.h \
- H5Spublic.h \
- H5Zprivate.h \
- H5Zpublic.h \
- H5Eprivate.h \
- H5Epublic.h \
- H5Iprivate.h \
- H5MMprivate.h \
- H5MMpublic.h
H5S.o: \
H5S.c \
H5private.h \
@@ -1021,33 +908,6 @@ H5Sall.o: \
H5Zprivate.h \
H5Zpublic.h \
H5Vprivate.h
-H5Shyper.o: \
- H5Shyper.c \
- H5private.h \
- H5public.h \
- H5config.h \
- H5api_adpt.h \
- H5Eprivate.h \
- H5Epublic.h \
- H5Ipublic.h \
- H5Sprivate.h \
- H5Spublic.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Dpublic.h \
- H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
- H5Oprivate.h \
- H5Opublic.h \
- H5HGprivate.h \
- H5HGpublic.h \
- H5Tprivate.h \
- H5Tpublic.h \
- H5Zprivate.h \
- H5Zpublic.h \
- H5Vprivate.h
H5Smpio.o: \
H5Smpio.c \
H5private.h \
@@ -1183,8 +1043,20 @@ H5T.o: \
H5MMpublic.h \
H5Tpkg.h \
H5Rprivate.h
-H5Tbit.o: \
- H5Tbit.c \
+H5TB.o: \
+ H5TB.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Iprivate.h \
+ H5Ipublic.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5MMprivate.h \
+ H5MMpublic.h
+H5V.o: \
+ H5V.c \
H5private.h \
H5public.h \
H5config.h \
@@ -1192,19 +1064,110 @@ H5Tbit.o: \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
- H5Iprivate.h \
- H5Tpkg.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h
+H5RA.o: \
+ H5RA.c \
+ H5RAprivate.h \
+ H5RApublic.h \
+ H5Ipublic.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Dprivate.h \
+ H5Dpublic.h \
+ H5private.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5Iprivate.h \
+ H5MMprivate.h \
+ H5MMpublic.h
+H5Shyper.o: \
+ H5Shyper.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5Ipublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
- H5Rprivate.h \
- H5Rpublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Vprivate.h
+H5F.o: \
+ H5F.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Aprivate.h \
+ H5Apublic.h \
+ H5Ipublic.h \
H5Gprivate.h \
- H5Gpublic.h
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Dprivate.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Iprivate.h \
+ H5ACprivate.h \
+ H5ACpublic.h \
+ H5Eprivate.h \
+ H5Epublic.h
H5Tconv.o: \
H5Tconv.c \
H5Iprivate.h \
@@ -1229,42 +1192,57 @@ H5Tconv.o: \
H5Tpublic.h \
H5Gprivate.h \
H5Gpublic.h
-H5Tinit.o: \
- H5Tinit.c \
+H5Flow.o: \
+ H5Flow.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
- H5Iprivate.h \
- H5Ipublic.h \
H5Eprivate.h \
H5Epublic.h \
- H5MMprivate.h \
- H5MMpublic.h \
- H5Tpkg.h \
- H5HGprivate.h \
- H5HGpublic.h \
+ H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
- H5Dpublic.h \
- H5Rprivate.h \
- H5Rpublic.h \
- H5Tprivate.h \
- H5Tpublic.h
-H5TB.o: \
- H5TB.c \
+ H5Dpublic.h
+H5G.o: \
+ H5G.c \
H5private.h \
H5public.h \
H5config.h \
H5api_adpt.h \
- H5Iprivate.h \
+ H5Aprivate.h \
+ H5Apublic.h \
H5Ipublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Dprivate.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
+ H5Gpkg.h \
+ H5ACprivate.h \
+ H5ACpublic.h \
+ H5HLprivate.h \
+ H5HLpublic.h \
+ H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h
-H5V.o: \
- H5V.c \
+H5Tbit.o: \
+ H5Tbit.c \
H5private.h \
H5public.h \
H5config.h \
@@ -1272,17 +1250,39 @@ H5V.o: \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
- H5Oprivate.h \
- H5Opublic.h \
+ H5Iprivate.h \
+ H5Tpkg.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
+ H5Rprivate.h \
+ H5Rpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
+ H5Gpublic.h
+H5Tinit.o: \
+ H5Tinit.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5api_adpt.h \
+ H5Iprivate.h \
+ H5Ipublic.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5MMprivate.h \
+ H5MMpublic.h \
+ H5Tpkg.h \
H5HGprivate.h \
H5HGpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Rprivate.h \
+ H5Rpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5Z.o: \
diff --git a/src/H5A.c b/src/H5A.c
index 94c4c66..a52d773 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -990,7 +990,7 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf)
}
/* get the real attribute length */
- ret_value=HDstrlen(attr->name);
+ ret_value=(hssize_t)HDstrlen(attr->name);
/* compute the string length which will fit into the user's buffer */
copy_len=MIN(buf_size-1,ret_value);
diff --git a/src/H5D.c b/src/H5D.c
index f3ef9d1..a303af5 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -2324,7 +2324,7 @@ H5D_init_storage(H5D_t *dset, const H5S_t *space)
{
intn ndims;
hsize_t dim[H5O_LAYOUT_NDIMS];
- hssize_t npoints, ptsperbuf;
+ hssize_t npoints, ptsperbuf;
size_t size, bufsize=8*1024;
hid_t buf_id = -1;
haddr_t addr;
@@ -2350,7 +2350,8 @@ H5D_init_storage(H5D_t *dset, const H5S_t *space)
* this quite efficiently by making sure we copy the fill value
* in relatively large pieces.
*/
- ptsperbuf = MAX(1, bufsize/dset->create_parms->fill.size);
+ ptsperbuf = (hssize_t)MAX(1,
+ bufsize/dset->create_parms->fill.size);
bufsize = ptsperbuf * dset->create_parms->fill.size;
if ((buf_id=H5TB_get_buf(bufsize, TRUE, &buf))<0) {
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 7f3fb7f..a4d415c 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -1181,7 +1181,8 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout,
assert(split_ratios);
if (rdcc->nslots>0) {
- idx = layout->addr.offset;
+ /* We don't care about loss of precision in the following statement. */
+ idx = (uintn)(layout->addr.offset);
H5F_MIXUP(idx);
for (i=0; i<layout->ndims; i++) {
idx += offset[i];
diff --git a/src/H5F.c b/src/H5F.c
index 5cc5cf8..b2f351d 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -251,7 +251,7 @@ H5F_term_interface(intn status)
static intn
H5F_flush_all_cb(H5F_t *f, const void *_invalidate)
{
- hbool_t invalidate = (hbool_t)_invalidate;
+ hbool_t invalidate = *((const hbool_t*)_invalidate);
H5F_flush(f, H5F_SCOPE_LOCAL, invalidate);
return 0;
}
@@ -279,7 +279,7 @@ H5F_flush_all(hbool_t invalidate)
{
FUNC_ENTER(H5F_flush_all, FAIL);
H5I_search(H5I_FILE, (H5I_search_func_t)H5F_flush_all_cb,
- (void*)invalidate);
+ (void*)&invalidate);
FUNC_LEAVE(SUCCEED);
}
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 7f3fb7f..a4d415c 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -1181,7 +1181,8 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout,
assert(split_ratios);
if (rdcc->nslots>0) {
- idx = layout->addr.offset;
+ /* We don't care about loss of precision in the following statement. */
+ idx = (uintn)(layout->addr.offset);
H5F_MIXUP(idx);
for (i=0; i<layout->ndims; i++) {
idx += offset[i];
diff --git a/src/H5Flow.c b/src/H5Flow.c
index cb518e6..2ec0897e 100644
--- a/src/H5Flow.c
+++ b/src/H5Flow.c
@@ -1033,8 +1033,10 @@ H5F_addr_pack(H5F_t __unused__ *f, haddr_t *addr, const unsigned long objno[2])
assert(objno);
assert(addr);
- addr->offset=objno[0];
- addr->offset|=((uint64_t)objno[1])<<(8*sizeof(long));
+ addr->offset = objno[0];
+#if SIZEOF_LONG<SIZEOF_UINT64_T
+ addr->offset |= ((uint64_t)objno[1]) << (8*sizeof(long));
+#endif
return(SUCCEED);
}
diff --git a/src/H5G.c b/src/H5G.c
index fd7659e..b75f20f 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -873,14 +873,13 @@ H5G_component(const char *name, size_t *size_p)
static const char *
H5G_basename(const char *name, size_t *size_p)
{
- size_t i, end;
+ size_t i;
FUNC_ENTER(H5G_basename, NULL);
/* Find the end of the base name */
i = strlen(name);
while (i>0 && '/'==name[i-1]) --i;
- end = i;
/* Skip backward over base name */
while (i>0 && '/'!=name[i-1]) --i;
@@ -1770,6 +1769,7 @@ H5G_loc (hid_t loc_id)
case H5I_NGROUPS:
case H5I_BADID:
case H5I_FILE_CLOSING:
+ case H5I_REFERENCE:
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object ID");
}
@@ -2005,10 +2005,12 @@ H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link,
} else {
/* Some other type of object */
statbuf->objno[0] = (unsigned long)(obj_ent.header.offset);
- if (sizeof(obj_ent.header.offset)>sizeof(long)) {
- statbuf->objno[1] = (unsigned long)(obj_ent.header.offset >>
- 8*sizeof(long));
- }
+#if SIZEOF_UINT64_T>SIZEOF_LONG
+ statbuf->objno[1] = (unsigned long)(obj_ent.header.offset >>
+ 8*sizeof(long));
+#else
+ statbuf->objno[1] = 0;
+#endif
statbuf->nlink = H5O_link (&obj_ent, 0);
statbuf->type = H5G_LINK;
if (NULL==H5O_read(&obj_ent, H5O_MTIME, 0, &(statbuf->mtime))) {
diff --git a/src/H5I.c b/src/H5I.c
index 54e516f..a9bf18f 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -170,7 +170,7 @@ H5I_term_interface(intn status)
H5I_type_t grp;
if (interface_initialize_g>0) {
- for (grp=0; grp<H5I_NGROUPS; grp++) {
+ for (grp=(H5I_type_t)0; grp<H5I_NGROUPS; grp++) {
/*
* Destroy each group regardless of reference count. This removes
* any objects which might still be defined in the group. Then
diff --git a/src/H5Ocomp.c b/src/H5Ocomp.c
index 32c4760..33e927c 100644
--- a/src/H5Ocomp.c
+++ b/src/H5Ocomp.c
@@ -179,7 +179,7 @@ H5O_pline_encode (H5F_t __unused__ *f, uint8_t *p/*out*/, const void *mesg)
assert (mesg);
*p++ = H5O_PLINE_VERSION;
- *p++ = pline->nfilters;
+ *p++ = (uint8_t)(pline->nfilters);
*p++ = 0; /*reserved 1*/
*p++ = 0; /*reserved 2*/
*p++ = 0; /*reserved 3*/
diff --git a/src/H5P.c b/src/H5P.c
index e1734b2..230e81a 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -2316,7 +2316,7 @@ H5Pget_nfilters(hid_t plist_id)
"not a dataset creation property list");
}
- FUNC_LEAVE(plist->pline.nfilters);
+ FUNC_LEAVE((int)(plist->pline.nfilters));
}
diff --git a/src/H5R.c b/src/H5R.c
index e6b09fc..261aae1 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -483,7 +483,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5S_t *
-H5R_get_region(H5D_t *dset, H5R_type_t ref_type, void *_ref)
+H5R_get_region(H5D_t *dset, H5R_type_t __unused__ ref_type, void *_ref)
{
H5D_t *dataset; /* Pointer to dataset to open */
H5G_entry_t ent; /* Symbol table entry */
diff --git a/src/H5RA.c b/src/H5RA.c
index 1c5a9f4..76455b5 100644
--- a/src/H5RA.c
+++ b/src/H5RA.c
@@ -543,14 +543,12 @@ H5RA_open(H5G_entry_t *loc, const char *name)
herr_t
H5RAclose(hid_t array_id)
{
- H5RA_t *ra=NULL;
-
FUNC_ENTER(H5RAclose, FAIL);
H5TRACE1("e","i",array_id);
/* Check args */
if (H5I_RAGGED!=H5I_get_type(array_id) ||
- NULL==(ra=H5I_object(array_id))) {
+ NULL==H5I_object(array_id)) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a ragged array");
}
diff --git a/src/H5T.c b/src/H5T.c
index 61b6521..746afa6 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -6221,7 +6221,7 @@ H5T_entof (H5T_t *dt)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_print_stats(H5T_path_t __unused__ *path, intn *nprint/*in,out*/)
+H5T_print_stats(H5T_path_t __unused__ *path, intn __unused__ *nprint/*in,out*/)
{
#ifdef H5T_DEBUG
hsize_t nbytes;
@@ -6449,8 +6449,8 @@ H5T_debug(H5T_t *dt, FILE *stream)
for (i=0; i<dt->u.enumer.nmembs; i++) {
fprintf(stream, "\n\"%s\" = 0x", dt->u.enumer.name[i]);
for (k=0; k<base_size; k++) {
- fprintf(stream, "%02x",
- (unsigned)(dt->u.enumer.value+i*base_size+k));
+ fprintf(stream, "%02lx",
+ (unsigned long)(dt->u.enumer.value+i*base_size+k));
}
}
fprintf(stream, "\n");
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index ed074ab..f675794 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -314,6 +314,7 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
{
ssize_t base=(ssize_t)offset;
ssize_t idx, i;
+ size_t iu;
/* Some functions call this with value=TRUE */
assert (TRUE==1);
@@ -322,14 +323,14 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
switch (direction) {
case H5T_BIT_LSB:
/* Calculate index */
- idx = offset / 8;
+ idx = (ssize_t)(offset / 8);
offset %= 8;
/* Beginning */
if (offset) {
- for (i=offset; i<8 && size>0; i++, size--) {
- if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
- return 8*idx+i - base;
+ for (iu=offset; iu<8 && size>0; iu++, size--) {
+ if (value==(hbool_t)((buf[idx]>>iu) & 0x01)) {
+ return 8*idx+(ssize_t)iu - base;
}
}
offset = 0;
@@ -357,14 +358,14 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
case H5T_BIT_MSB:
/* Calculate index */
- idx = (offset+size-1) / 8;
+ idx = (ssize_t)((offset+size-1) / 8);
offset %= 8;
/* Beginning */
if (size>8-offset && (offset+size)%8) {
- for (i=(offset+size)%8-1; i>=0; --i, --size) {
- if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
- return 8*idx+i - base;
+ for (iu=(offset+size)%8; iu>0; --iu, --size) {
+ if (value==(hbool_t)((buf[idx]>>(iu-1)) & 0x01)) {
+ return 8*idx+(ssize_t)(iu-1) - base;
}
}
--idx;
@@ -383,9 +384,9 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
}
/* End */
if (size>0) {
- for (i=offset+size-1; i>=(ssize_t)offset; --i) {
- if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
- return 8*idx+i - base;
+ for (iu=offset+size; iu>offset; --iu) {
+ if (value==(hbool_t)((buf[idx]>>(iu-1)) & 0x01)) {
+ return 8*idx+(ssize_t)(iu-1) - base;
}
}
}
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 8816894..462bc25 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -126,7 +126,7 @@ static intn interface_initialize_g = 0;
#define H5T_CONV_sS(S_ALIGN,D_ALIGN,ST,DT) { \
assert(sizeof(ST)<=sizeof(DT)); \
CI_BEGIN(S_ALIGN, D_ALIGN, ST, DT, nelmts-1, --) { \
- *d = *s; \
+ *d = (DT)(*s); \
} CI_END; \
}
@@ -139,7 +139,7 @@ static intn interface_initialize_g = 0;
*d = 0; \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -153,7 +153,7 @@ static intn interface_initialize_g = 0;
*d = (D_MAX); \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -161,7 +161,7 @@ static intn interface_initialize_g = 0;
#define H5T_CONV_uU(STYPE,DTYPE,ST,DT) { \
assert(sizeof(ST)<=sizeof(DT)); \
CI_BEGIN(STYPE, DTYPE, ST, DT, nelmts-1, --) { \
- *d = *s; \
+ *d = (DT)(*s); \
} CI_END; \
}
@@ -179,7 +179,7 @@ static intn interface_initialize_g = 0;
*d = (D_MIN); \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -199,7 +199,7 @@ static intn interface_initialize_g = 0;
*d = (D_MAX); \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -213,7 +213,7 @@ static intn interface_initialize_g = 0;
*d = (D_MAX); \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -227,7 +227,7 @@ static intn interface_initialize_g = 0;
*d = (D_MAX); \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -241,7 +241,7 @@ static intn interface_initialize_g = 0;
*d = 0; \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -255,7 +255,7 @@ static intn interface_initialize_g = 0;
*d = (D_MAX); \
} \
} else { \
- *d = *s; \
+ *d = (DT)(*s); \
} \
} CI_END; \
}
@@ -1100,12 +1100,12 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* Direction of conversion.
*/
if (dst->size <= src->size) {
- src_delta = src->size;
- dst_delta = dst->size;
+ src_delta = (int)src->size; /*overflow shouldn't be possible*/
+ dst_delta = (int)dst->size; /*overflow shouldn't be possible*/
s = d = buf;
} else {
- src_delta = -(src->size);
- dst_delta = -(dst->size);
+ src_delta = -(int)src->size; /*overflow shouldn't be possible*/
+ dst_delta = -(int)dst->size; /*overflow shouldn't be possible*/
s = buf + (nelmts-1) * src->size;
d = buf + (nelmts-1) * dst->size;
}
@@ -2013,14 +2013,18 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
direction = 1;
olap = 0;
} else if (src->size>=dst->size) {
+ double olapd = HDceil((double)(dst->size)/
+ (double)(src->size-dst->size));
+ olap = (size_t)olapd;
sp = dp = (uint8_t*)buf;
direction = 1;
- olap = HDceil((double)(dst->size)/(double)(src->size-dst->size));
} else {
+ double olapd = HDceil((double)(src->size)/
+ (double)(dst->size-src->size));
+ olap = (size_t)olapd;
sp = (uint8_t*)buf + (nelmts-1) * src->size;
dp = (uint8_t*)buf + (nelmts-1) * dst->size;
direction = -1;
- olap = HDceil((double)(src->size)/(double)(dst->size-src->size));
}
/* Allocate the overlap buffer */
@@ -2034,7 +2038,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* If the source and destination buffers overlap then use a
- * temporary buffer fot eh destination.
+ * temporary buffer for the destination.
*/
if (direction>0) {
s = sp;
diff --git a/src/H5Z.c b/src/H5Z.c
index c9c6d13..bb22f47 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -501,22 +501,22 @@ H5Z_filter_deflate (uintn flags, size_t cd_nelmts, const uintn cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
size_t ret_value = 0;
- int aggression = 6;
void *outbuf = NULL;
#if defined(HAVE_COMPRESS2)
+ int aggression = 6;
int status;
#endif
FUNC_ENTER (H5Z_filter_deflate, 0);
- /* Get aggression level */
+ /* Check arguments */
if (cd_nelmts!=1 || cd_values[0]>9) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, 0,
"invalid deflate aggression level");
}
- aggression = cd_values[0];
#if defined(HAVE_COMPRESS2)
+ aggression = cd_values[0];
if (flags & H5Z_FLAG_REVERSE) {
/* Input; uncompress */
z_stream z_strm;
diff --git a/src/H5detect.c b/src/H5detect.c
index 92fe3ae..3346b91 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -249,6 +249,7 @@ precision (detected_t *d)
pid_t _child; \
int _status; \
\
+ srand((unsigned int)_val); /*suppress "set but unused" warning*/ \
for (_ano=0; _ano<NELMTS(align_g); _ano++) { \
fflush(stdout); \
fflush(stderr); \