X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b356ce9a510410f879eb3cd1b16b33856aebfdbe..40616078da72e823931c1fb884949054699ec39d:/src/surf/storage_n11.cpp?ds=sidebyside diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index 88b7996548..b89e1956ee 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -28,12 +28,6 @@ static inline void routing_storage_type_free(void *r) free(stype); } -static inline void routing_storage_host_free(void *r) -{ - xbt_dynar_t dyn = (xbt_dynar_t) r; - xbt_dynar_free(&dyn); -} - static void check_disk_attachment() { xbt_lib_cursor_t cursor; @@ -56,7 +50,6 @@ void storage_register_callbacks() instr_routing_define_callbacks(); ROUTING_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, xbt_free_f); - ROUTING_STORAGE_HOST_LEVEL = xbt_lib_add_level(storage_lib, routing_storage_host_free); ROUTING_STORAGE_TYPE_LEVEL = xbt_lib_add_level(storage_type_lib, routing_storage_type_free); SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib, [](void *self) { delete static_cast(self); @@ -192,8 +185,8 @@ StorageAction *StorageN11::open(const char* mount, const char* path) { XBT_DEBUG("\tOpen file '%s'",path); - sg_size_t size, *psize; - psize = (sg_size_t*) xbt_dict_get_or_null(content_, path); + sg_size_t size; + sg_size_t* psize = (sg_size_t*)xbt_dict_get_or_null(content_, path); // if file does not exist create an empty file if(psize) size = *psize; @@ -297,6 +290,8 @@ StorageN11Action::StorageN11Action(Model *model, double cost, bool failed, Stora // storage->p_writeActions->push_back(action); // ref(); break; + default: + THROW_UNIMPLEMENTED; } XBT_OUT(); }