summaryrefslogtreecommitdiffstats
path: root/src/H5Olayout.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-03-13 04:19:46 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-03-13 04:19:46 (GMT)
commitc17a5d1278a43efc8b62c718f5897e4ec1ed82e9 (patch)
treeecbb6277dc6e40f442eac1ded3d0e02fd92fef92 /src/H5Olayout.c
parent57295db6c750b6c8d148652b826d3a006f38e6aa (diff)
downloadhdf5-c17a5d1278a43efc8b62c718f5897e4ec1ed82e9.zip
hdf5-c17a5d1278a43efc8b62c718f5897e4ec1ed82e9.tar.gz
hdf5-c17a5d1278a43efc8b62c718f5897e4ec1ed82e9.tar.bz2
[svn-r22058] Description:
Better fix for zero-sized dataset error (r22053). Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
Diffstat (limited to 'src/H5Olayout.c')
-rw-r--r--src/H5Olayout.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index e4d6486..1b17bff 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -241,6 +241,8 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
mesg->ops = H5D_LOPS_CHUNK;
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "Invalid layout class")
} /* end switch */
@@ -342,6 +344,8 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi
UINT32ENCODE(p, mesg->u.chunk.dim[u]);
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "Invalid layout class")
} /* end switch */
@@ -556,6 +560,8 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "not valid storage type")
} /* end switch */
@@ -641,6 +647,8 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
} /* end if */
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "Invalid layout class")
} /* end switch */
@@ -737,6 +745,8 @@ H5O_layout_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg,
"Data Size:", mesg->storage.u.compact.size);
break;
+ case H5D_LAYOUT_ERROR:
+ case H5D_NLAYOUTS:
default:
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
"Type:", "Unknown", (unsigned)mesg->type);