summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Clog_trace.c2
-rw-r--r--src/H5Dint.c1
-rw-r--r--src/H5Fint.c2
-rw-r--r--src/H5Fprivate.h16
-rw-r--r--src/H5Fsuper.c11
-rw-r--r--src/H5Gloc.c5
-rw-r--r--src/H5Gname.c1
-rw-r--r--src/H5Gtest.c1
-rw-r--r--src/H5I.c2
-rw-r--r--src/H5O.c1
-rw-r--r--src/H5Oflush.c1
-rw-r--r--src/H5Oint.c1
-rw-r--r--src/H5Opkg.h4
-rw-r--r--src/H5SM.c1
-rw-r--r--src/H5Shyper.c8
-rw-r--r--src/H5T.c1
-rw-r--r--src/H5Tnative.c12
-rw-r--r--src/H5VLint.c1
-rw-r--r--src/H5Zshuffle.c14
-rw-r--r--src/H5checksum.c11
-rw-r--r--src/H5private.h3
-rw-r--r--src/H5trace.c2
22 files changed, 79 insertions, 22 deletions
diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c
index 7c1305c..713f333 100644
--- a/src/H5Clog_trace.c
+++ b/src/H5Clog_trace.c
@@ -41,7 +41,7 @@
/****************/
/* Max log message size */
-#define H5C_MAX_TRACE_LOG_MSG_SIZE 2048
+#define H5C_MAX_TRACE_LOG_MSG_SIZE 4096
/******************/
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 220f026..63d1160 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1095,7 +1095,6 @@ H5D__build_file_prefix(const H5D_t *dset, H5F_prefix_open_t prefix_type, char **
size_t filepath_len; /* length of file path */
size_t prefix_len; /* length of prefix */
size_t file_prefix_len; /* length of expanded prefix */
- H5P_genplist_t *plist = NULL; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
diff --git a/src/H5Fint.c b/src/H5Fint.c
index ee9afed..030fda8 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -509,6 +509,7 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "unknown or invalid data object")
@@ -3610,6 +3611,7 @@ H5F__get_file(void *obj, H5I_type_t type)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object")
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 0fa2214..e9b6c32 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -160,16 +160,16 @@ typedef struct H5F_t H5F_t;
(i) |= (uint16_t)((*(p) & 0xff) << 8); (p)++; \
}
-# define INT32DECODE(p, i) { \
- (i) = ((int32_t)(*(p) & (unsigned)0xff)); (p)++; \
- (i) |= ((int32_t)(*(p) & (unsigned)0xff) << 8); (p)++; \
- (i) |= ((int32_t)(*(p) & (unsigned)0xff) << 16); (p)++; \
- (i) |= ((int32_t)(((*(p) & (unsigned)0xff) << 24) | \
- ((*(p) & (unsigned)0x80) ? (unsigned)(~0xffffffff) : (unsigned)0x0))); (p)++; \
+# define INT32DECODE(p, i) { \
+ (i) = ((int32_t)(*(p) & 0xff)); (p)++; \
+ (i) |= ((int32_t)(*(p) & 0xff) << 8); (p)++; \
+ (i) |= ((int32_t)(*(p) & 0xff) << 16); (p)++; \
+ (i) |= ((int32_t)(((*(p) & (unsigned)0xff) << 24) | \
+ ((*(p) & 0x80) ? ~0xffffffffULL : 0x0ULL))); (p)++; \
}
-# define UINT32DECODE(p, i) { \
- (i) = (uint32_t)(*(p) & 0xff); (p)++; \
+# define UINT32DECODE(p, i) { \
+ (i) = (uint32_t)(*(p) & 0xff); (p)++; \
(i) |= ((uint32_t)(*(p) & 0xff) << 8); (p)++; \
(i) |= ((uint32_t)(*(p) & 0xff) << 16); (p)++; \
(i) |= ((uint32_t)(*(p) & 0xff) << 24); (p)++; \
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index aa5a85d..ef52844 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -513,15 +513,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
#endif /* H5_HAVE_PARALLEL */
/* Check if superblock address is different from base address and adjust
- * base address and "end of address" address if so.
+ * base address and "end of file" address if so.
*/
if(!H5F_addr_eq(super_addr, sblock->base_addr)) {
- /* Check if the superblock moved earlier in the file */
- if(H5F_addr_lt(super_addr, sblock->base_addr))
- udata.stored_eof -= (sblock->base_addr - super_addr);
- else
- /* The superblock moved later in the file */
- udata.stored_eof += (super_addr - sblock->base_addr);
+ /* If the superblock moved in the file, adjust the EOF */
+ /* (Handles moving earlier & later) */
+ udata.stored_eof -= (sblock->base_addr - super_addr);
/* Adjust base address for offsets of the HDF5 data in the file */
sblock->base_addr = super_addr;
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 5724031..e47d3be 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -226,7 +226,10 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a virtual file driver (VFD)")
case H5I_VOL:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a virtual object layer (VOL) driver")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a virtual object layer (VOL) connector")
+
+ case H5I_SPACE_SEL_ITER:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a dataspace selection iterator")
case H5I_UNINIT:
case H5I_BADID:
diff --git a/src/H5Gname.c b/src/H5Gname.c
index fa0a925..16c1ca7 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -828,6 +828,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object")
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index af6acb3..0b431b1 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -616,6 +616,7 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown data object type")
diff --git a/src/H5I.c b/src/H5I.c
index 87ff04a..cdc849b 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2171,7 +2171,6 @@ H5Iget_name(hid_t id, char *name/*out*/, size_t size)
{
H5VL_object_t *vol_obj; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
- H5G_loc_t loc; /* Object location */
ssize_t ret_value; /* Return value */
FUNC_ENTER_API((-1))
@@ -2384,6 +2383,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
break; /* Other types of IDs are not stored in files */
diff --git a/src/H5O.c b/src/H5O.c
index 0fdb9be..093d429 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1102,6 +1102,7 @@ H5Oclose(hid_t object_id)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_CANTRELEASE, FAIL, "not a valid file object ID (dataset, group, or datatype)")
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index da9d1d0..f5ede4a 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -491,6 +491,7 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, H5VL_t *vol_connector
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "not a valid file object ID (dataset, group, or datatype)")
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 60aae45..45a8046 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -1848,6 +1848,7 @@ H5O_get_loc(hid_t object_id)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, NULL, "invalid object type")
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index 668f4f0..4afa452 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -134,9 +134,9 @@
) : 0)) \
)
#define H5O_SIZEOF_MSGHDR_OH(O) \
- H5O_SIZEOF_MSGHDR_VERS((O)->version, (O)->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
+ (unsigned)H5O_SIZEOF_MSGHDR_VERS((O)->version, (O)->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
#define H5O_SIZEOF_MSGHDR_F(F, C) \
- H5O_SIZEOF_MSGHDR_VERS(MAX((H5F_STORE_MSG_CRT_IDX(F) ? H5O_VERSION_LATEST : H5O_VERSION_1), (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(F)]), (C))
+ (unsigned)H5O_SIZEOF_MSGHDR_VERS(MAX((H5F_STORE_MSG_CRT_IDX(F) ? H5O_VERSION_LATEST : H5O_VERSION_1), (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(F)]), (C))
/*
* Size of chunk "header" for each chunk
diff --git a/src/H5SM.c b/src/H5SM.c
index 3946f51..290e575 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -274,6 +274,7 @@ H5SM__type_to_flag(unsigned type_id, unsigned *type_flag)
case H5O_FILL_ID:
type_id = H5O_FILL_NEW_ID;
/* Fall through... */
+ H5_ATTR_FALLTHROUGH
case H5O_SDSPACE_ID:
case H5O_DTYPE_ID:
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 4c8e458..2acc135 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -2142,18 +2142,25 @@ loc += fast_dim_buf_off;
do
{
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 7:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 6:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 5:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 4:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 3:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 2:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 1:
DUFF_GUTS
} while (--duffs_index > 0);
@@ -10013,6 +10020,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[],
if(op == H5S_SELECT_SET) /* Allow only "set" operation to proceed */
break;
/* Else fall through to error */
+ H5_ATTR_FALLTHROUGH
case H5S_SEL_ERROR:
case H5S_SEL_N:
diff --git a/src/H5T.c b/src/H5T.c
index 8c8a9b7..3098325 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1738,6 +1738,7 @@ H5Tcopy(hid_t type_id)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a datatype or dataset")
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 3554f75..f40d81b 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -551,6 +551,9 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
FUNC_ENTER_STATIC
if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
+/* Disable warning for intentional identical branches here -QAK */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wduplicated-branches"
if(prec <= H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_SCHAR_g))) {
match = H5T_NATIVE_INT_MATCH_CHAR;
native_size = sizeof(char);
@@ -570,6 +573,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
match = H5T_NATIVE_INT_MATCH_LLONG;
native_size = sizeof(long long);
}
+#pragma GCC diagnostic pop
} else if(direction == H5T_DIR_DESCEND) {
if(prec > H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_LONG_g))) {
match = H5T_NATIVE_INT_MATCH_LLONG;
@@ -694,6 +698,9 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
HDassert(size>0);
if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
+/* Disable warning for intentional identical branches here -QAK */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wduplicated-branches"
if(size<=sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
native_size = sizeof(float);
@@ -717,6 +724,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
native_size = sizeof(double);
#endif
}
+#pragma GCC diagnostic pop
} else {
#if H5_SIZEOF_LONG_DOUBLE !=0
if(size>sizeof(double)) {
@@ -810,6 +818,9 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
FUNC_ENTER_STATIC
if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
+/* Disable warning for intentional identical branches here -QAK */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wduplicated-branches"
if(prec<=H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_B8_g))) {
tid = H5T_NATIVE_B8;
native_size = 1;
@@ -831,6 +842,7 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
native_size = 8;
align = H5T_NATIVE_UINT64_ALIGN_g;
}
+#pragma GCC diagnostic pop
} else if(direction == H5T_DIR_DESCEND) {
if(prec>H5T_get_precision((H5T_t *)H5I_object(H5T_NATIVE_B32_g))) {
tid = H5T_NATIVE_B64;
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 1b735f5..884b2f6 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -1437,6 +1437,7 @@ H5VL__object(hid_t id, H5I_type_t obj_type)
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
+ case H5I_SPACE_SEL_ITER:
case H5I_NTYPES:
default:
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unknown data object type")
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index e70ef33..b1d0722 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -185,18 +185,25 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
do
{
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 7:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 6:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 5:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 4:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 3:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 2:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 1:
DUFF_GUTS
} while (--duffs_index > 0);
@@ -243,18 +250,25 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
do
{
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 7:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 6:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 5:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 4:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 3:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 2:
DUFF_GUTS
+ H5_ATTR_FALLTHROUGH
case 1:
DUFF_GUTS
} while (--duffs_index > 0);
diff --git a/src/H5checksum.c b/src/H5checksum.c
index 64d527e..4e98976 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -407,16 +407,27 @@ H5_checksum_lookup3(const void *key, size_t length, uint32_t initval)
switch(length) /* all the case statements fall through */
{
case 12: c+=((uint32_t)k[11])<<24;
+ H5_ATTR_FALLTHROUGH
case 11: c+=((uint32_t)k[10])<<16;
+ H5_ATTR_FALLTHROUGH
case 10: c+=((uint32_t)k[9])<<8;
+ H5_ATTR_FALLTHROUGH
case 9 : c+=k[8];
+ H5_ATTR_FALLTHROUGH
case 8 : b+=((uint32_t)k[7])<<24;
+ H5_ATTR_FALLTHROUGH
case 7 : b+=((uint32_t)k[6])<<16;
+ H5_ATTR_FALLTHROUGH
case 6 : b+=((uint32_t)k[5])<<8;
+ H5_ATTR_FALLTHROUGH
case 5 : b+=k[4];
+ H5_ATTR_FALLTHROUGH
case 4 : a+=((uint32_t)k[3])<<24;
+ H5_ATTR_FALLTHROUGH
case 3 : a+=((uint32_t)k[2])<<16;
+ H5_ATTR_FALLTHROUGH
case 2 : a+=((uint32_t)k[1])<<8;
+ H5_ATTR_FALLTHROUGH
case 1 : a+=k[0];
break;
case 0 : goto done;
diff --git a/src/H5private.h b/src/H5private.h
index dad2d94..86cd615 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -309,6 +309,7 @@
# define H5_ATTR_NORETURN /*void*/
# define H5_ATTR_CONST /*void*/
# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#else /* __cplusplus */
#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C)
# define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z)))
@@ -316,12 +317,14 @@
# define H5_ATTR_NORETURN __attribute__((noreturn))
# define H5_ATTR_CONST __attribute__((const))
# define H5_ATTR_PURE __attribute__((pure))
+# define H5_ATTR_FALLTHROUGH __attribute__((fallthrough));
#else
# define H5_ATTR_FORMAT(X,Y,Z) /*void*/
# define H5_ATTR_UNUSED /*void*/
# define H5_ATTR_NORETURN /*void*/
# define H5_ATTR_CONST /*void*/
# define H5_ATTR_PURE /*void*/
+# define H5_ATTR_FALLTHROUGH /*void*/
#endif
#endif /* __cplusplus */
diff --git a/src/H5trace.c b/src/H5trace.c
index 9c858fc..c5d14f5 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -173,7 +173,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if(current_depth < last_call_depth) {
/* We are at the beginning of a line */
if(H5_debug_g.ttimes) {
- char tmp[128];
+ char tmp[320];
HDsprintf(tmp, "%.6f", event_time.etime-first_time.etime);
HDfprintf(out, " %*s ", (int)HDstrlen(tmp), "");