summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Odtype.c2
-rw-r--r--src/H5Pgcpl.c2
-rw-r--r--src/H5Pocpl.c1
-rw-r--r--src/H5T.c2
-rw-r--r--src/H5private.h4
-rw-r--r--src/H5public.h15
6 files changed, 21 insertions, 5 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index cee6e1e..e51d319 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -263,7 +263,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
unsigned offset_nbytes; /* Size needed to encode member offsets */
size_t max_memb_pos = 0; /* Maximum member covered, so far */
unsigned max_version = 0; /* Maximum member version */
- hbool_t upgrade_to = 0; /* Version number we can "soft" upgrade to */
+ unsigned upgrade_to = 0; /* Version number we can "soft" upgrade to */
unsigned j;
/* Compute the # of bytes required to store a member offset */
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index f84fa7b..f028f7a 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -594,6 +594,7 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
FUNC_ENTER_STATIC_NOERR
/* Set property to default value */
+ HDmemset(ginfo, 0, sizeof(H5O_ginfo_t));
*ginfo = H5G_def_ginfo_g;
UINT32DECODE(*pp, ginfo->lheap_size_hint)
@@ -692,6 +693,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded")
/* Set property to default value */
+ HDmemset(linfo, 0, sizeof(H5O_linfo_t));
*linfo = H5G_def_linfo_g;
H5_DECODE_UNSIGNED(*pp, crt_order_flags)
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index 7ae5a6e..27044d5 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -1590,6 +1590,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
nused = (size_t)enc_value;
/* Set property default value */
+ HDmemset(pline, 0, sizeof(H5O_pline_t));
*pline = H5O_def_pline_g;
for(u = 0; u < nused; u++) {
diff --git a/src/H5T.c b/src/H5T.c
index 1213bf7..21d6fcf 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -801,7 +801,7 @@ H5T__init_package(void)
H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HERR_g,COPY,native_int,SET,sizeof(herr_t))
/* hbool_t */
- H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HBOOL_g,COPY,native_int,SET,sizeof(hbool_t))
+ H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HBOOL_g,COPY,native_uint,SET,sizeof(hbool_t))
/*------------------------------------------------------------
* IEEE Types
diff --git a/src/H5private.h b/src/H5private.h
index 56061bf..26111ff 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -364,10 +364,10 @@
* HDF Boolean type.
*/
#ifndef FALSE
-# define FALSE 0
+ #define FALSE false
#endif
#ifndef TRUE
-# define TRUE 1
+ #define TRUE true
#endif
/*
diff --git a/src/H5public.h b/src/H5public.h
index f7f70cf..5b95fb7 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -141,7 +141,20 @@ typedef int herr_t;
* printf("error determining whether data type is committed\n");
* }
*/
-typedef unsigned int hbool_t;
+#ifdef H5_HAVE_STDBOOL_H
+ #include <stdbool.h>
+#else /* H5_HAVE_STDBOOL_H */
+ #ifndef __cplusplus
+ #if defined(H5_SIZEOF_BOOL) && (H5_SIZEOF_BOOL != 0)
+ #define bool _Bool
+ #else
+ #define bool unsigned int
+ #endif
+ #define true 1
+ #define false 0
+ #endif /* __cplusplus */
+#endif /* H5_HAVE_STDBOOL_H */
+typedef bool hbool_t;
typedef int htri_t;
/* Define the ssize_t type if it not is defined */