diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-08-02 21:54:34 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-08-02 21:54:34 (GMT) |
commit | 60d3b3091764c2ec9bede45aeacb6b2da1fa22d8 (patch) | |
tree | 31cc6c48f0f4976d10e4a7b9d726bb4222f2c0f3 /src/H5O.c | |
parent | bbaf4fb19b452e093bde1616df351dfa34f30840 (diff) | |
parent | cc7ae0a7fe9451062a1fb370ae2a36c0789a60e3 (diff) | |
download | hdf5-60d3b3091764c2ec9bede45aeacb6b2da1fa22d8.zip hdf5-60d3b3091764c2ec9bede45aeacb6b2da1fa22d8.tar.gz hdf5-60d3b3091764c2ec9bede45aeacb6b2da1fa22d8.tar.bz2 |
[svn-r22623] merge from tunk
Diffstat (limited to 'src/H5O.c')
-rw-r--r-- | src/H5O.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1450,7 +1450,7 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc, /* Cache object header */ if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR, oh_addr, oh, insert_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header") + HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header") oh = NULL; /* Reset metadata tag in dxpl_id */ @@ -1910,7 +1910,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot) while(curr_msg < cont_msg_info.nmsgs) { H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to bring it into memory */ #ifndef NDEBUG - unsigned chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */ + size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */ #endif /* NDEBUG */ /* Bring the chunk into the cache */ @@ -2200,15 +2200,15 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force) /* Check version, to determine how to store time information */ if(oh->version == H5O_VERSION_1) { - int idx; /* Index of modification time message to update */ + size_t idx; /* Index of modification time message to update */ /* Look for existing message */ - for(idx = 0; idx < (int)oh->nmesgs; idx++) + for(idx = 0; idx < oh->nmesgs; idx++) if(H5O_MSG_MTIME == oh->mesg[idx].type || H5O_MSG_MTIME_NEW == oh->mesg[idx].type) break; /* Create a new message, if necessary */ - if(idx == (int)oh->nmesgs) { + if(idx == oh->nmesgs) { unsigned mesg_flags = 0; /* Flags for message in object header */ /* If we would have to create a new message, but we aren't 'forcing' it, get out now */ @@ -2216,7 +2216,7 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force) HGOTO_DONE(SUCCEED); /*nothing to do*/ /* Allocate space for the modification time message */ - if((idx = H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now)) < 0) + if(H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_MTIME_NEW, &mesg_flags, &now, &idx) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for modification time message") /* Set the message's flags if appropriate */ @@ -2323,7 +2323,7 @@ done: herr_t H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned mesg_flags) { - int idx; /* Local index variable */ + size_t idx; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2332,7 +2332,7 @@ H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned mesg_flags) HDassert(oh); /* Look for existing message */ - for(idx = 0; idx < (int)oh->nmesgs; idx++) + for(idx = 0; idx < oh->nmesgs; idx++) if(H5O_MSG_BOGUS == oh->mesg[idx].type) break; @@ -2348,7 +2348,7 @@ H5O_bogus_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned mesg_flags) bogus->u = H5O_BOGUS_VALUE; /* Allocate space in the object header for bogus message */ - if((idx = H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_BOGUS, &mesg_flags, bogus)) < 0) + if(H5O_msg_alloc(f, dxpl_id, oh, H5O_MSG_BOGUS, &mesg_flags, bogus, &idx) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to allocate space for 'bogus' message") /* Point to "bogus" information (take it over) */ @@ -2909,8 +2909,8 @@ H5O_get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr) hdr->version = oh->version; /* Set the number of messages & chunks */ - hdr->nmesgs = oh->nmesgs; - hdr->nchunks = oh->nchunks; + H5_ASSIGN_OVERFLOW(hdr->nmesgs, oh->nmesgs, size_t, unsigned); + H5_ASSIGN_OVERFLOW(hdr->nchunks, oh->nchunks, size_t, unsigned); /* Set the status flags */ hdr->flags = oh->flags; |