diff options
Diffstat (limited to 'test/earray.c')
-rw-r--r-- | test/earray.c | 62 |
1 files changed, 15 insertions, 47 deletions
diff --git a/test/earray.c b/test/earray.c index 44d16c5..5211b97 100644 --- a/test/earray.c +++ b/test/earray.c @@ -163,22 +163,11 @@ typedef struct earray_test_t { static herr_t earray_cache_test_get_load_size(const void *udata_ptr, size_t *image_len_ptr); - -static void *earray_cache_test_deserialize(const void *image_ptr, - size_t len, - void *udata_ptr, - hbool_t *dirty_ptr); - -static herr_t earray_cache_test_image_len(const void *thing, - size_t *image_len_ptr, - hbool_t *compressed_ptr, - size_t * compressed_len_ptr); - -static herr_t earray_cache_test_serialize(const H5F_t *f, - void *image_ptr, - size_t len, - void *thing); - +static void *earray_cache_test_deserialize(const void *image_ptr, size_t len, + void *udata_ptr, hbool_t *dirty_ptr); +static herr_t earray_cache_test_image_len(const void *thing, size_t *image_len_ptr); +static herr_t earray_cache_test_serialize(const H5F_t *f, void *image_ptr, + size_t len, void *thing); static herr_t earray_cache_test_free_icr(void *thing); @@ -201,13 +190,13 @@ const H5AC_class_t H5AC_EARRAY_TEST[1] = {{ /* name */ "earray test", /* mem_type */ H5FD_MEM_DEFAULT, /* flags */ H5AC__CLASS_SKIP_READS | H5AC__CLASS_SKIP_WRITES, - /* get_load_size */ (H5AC_get_load_size_func_t)earray_cache_test_get_load_size, - /* deserialize */ (H5AC_deserialize_func_t)earray_cache_test_deserialize, - /* image_len */ (H5AC_image_len_func_t)earray_cache_test_image_len, - /* pre_serialize */ (H5AC_pre_serialize_func_t)NULL, - /* serialize */ (H5AC_serialize_func_t)earray_cache_test_serialize, - /* notify */ (H5AC_notify_func_t)NULL, - /* free_icr */ (H5AC_free_icr_func_t)earray_cache_test_free_icr, + /* get_load_size */ earray_cache_test_get_load_size, + /* deserialize */ earray_cache_test_deserialize, + /* image_len */ earray_cache_test_image_len, + /* pre_serialize */ NULL, + /* serialize */ earray_cache_test_serialize, + /* notify */ NULL, + /* free_icr */ earray_cache_test_free_icr, /* clear */ NULL, /* fsf_size */ NULL, }}; @@ -659,7 +648,6 @@ earray_cache_test_get_load_size(const void *udata_ptr, size_t *image_len_ptr) *image_len_ptr = 0; return(SUCCEED); - } /* end earray_cache_test_get_load_size() */ @@ -691,12 +679,10 @@ earray_cache_test_deserialize(const void *image_ptr, HDassert(udata_ptr); HDassert(dirty_ptr); - /* Should never be called */ HDassert(0 && "Can't be called!"); return(NULL); - } /* end earray_cache_test_deserialize() */ @@ -719,10 +705,8 @@ earray_cache_test_deserialize(const void *image_ptr, *------------------------------------------------------------------------- */ static herr_t -earray_cache_test_image_len(const void *thing, size_t *image_len_ptr, - hbool_t H5_ATTR_UNUSED * compressed_ptr, size_t H5_ATTR_UNUSED * compressed_len_ptr) +earray_cache_test_image_len(const void *thing, size_t *image_len_ptr) { - HDassert(thing); HDassert(image_len_ptr); @@ -731,14 +715,9 @@ earray_cache_test_image_len(const void *thing, size_t *image_len_ptr, *image_len_ptr = 1; return(SUCCEED); - } /* end earray_cache_test_image_len() */ -/********************************/ -/* no H5O_cache_pre_serialize() */ -/********************************/ - /*------------------------------------------------------------------------- * Function: earray_cache_test_serialize @@ -764,14 +743,12 @@ earray_cache_test_serialize(const H5F_t *f, H5_ATTR_UNUSED size_t len, void *thing) { - earray_test_t *test = NULL; + earray_test_t *test; HDassert(f); HDassert(image_ptr); HDassert(thing); - test = (earray_test_t *)thing; - HDassert(test); HDassert(test->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert((const H5AC_class_t *)(test->cache_info.type) == @@ -814,16 +791,10 @@ earray_cache_test_serialize(const H5F_t *f, return(SUCCEED); error: - return(FAIL); - } /* end earray_cache_test_serialize() */ -/******************************************/ -/* no earray_cache_test_notify() function */ -/******************************************/ - /*------------------------------------------------------------------------- * Function: earray_cache_test_free_icr @@ -846,12 +817,10 @@ error: static herr_t earray_cache_test_free_icr(void *thing) { - earray_test_t *test = NULL; + earray_test_t *test; HDassert(thing); - test = (earray_test_t *)thing; - HDassert(test); /* the metadata cache sets cache_info.magic to @@ -867,7 +836,6 @@ earray_cache_test_free_icr(void *thing) HDfree(test); return(SUCCEED); - } /* end earray_cache_test_free_icr() */ |