From b6e694cb329c684a6b63dba92613c0ff24b859d2 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sun, 19 Oct 2014 21:39:58 -0500 Subject: [svn-r25721] The return type of H5A_create was changed from hid_t to H5A_t * but the test was not changed (still doing H5A_create(...) < 0). Fixed the error by changing to compare against NULL. Tested: ADA AIX machine where the old code was flagged as an error by the AIX compiler. --- src/H5Adeprec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index 6342e18..247b4b5 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -186,7 +186,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") /* Go do the real work for attaching the attribute to the dataset */ - if((attr = H5A_create(&loc, name, type, space, plist_id, H5AC_dxpl_id)) < 0) + if(NULL==(attr = H5A_create(&loc, name, type, space, plist_id, H5AC_dxpl_id))) HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute") /* Register the new attribute and get an ID for it */ -- cgit v0.12