From 3c21f9a5558132308c3d0db9dd91fbca8dfa2f43 Mon Sep 17 00:00:00 2001 From: degomme Date: Thu, 16 Mar 2017 00:59:20 +0100 Subject: [PATCH] remove useless unspecialized template which was causing troubles with optimizations. --- src/smpi/smpi_keyvals.hpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/smpi/smpi_keyvals.hpp b/src/smpi/smpi_keyvals.hpp index 74c7722e9a..0ca8ffc0df 100644 --- a/src/smpi/smpi_keyvals.hpp +++ b/src/smpi/smpi_keyvals.hpp @@ -80,18 +80,13 @@ template int Keyval::keyval_free(int* keyval){ return MPI_SUCCESS; } -//specialized in smpi_keyvals.cpp -template int Keyval::call_deleter(T* obj, smpi_key_elem elem, int keyval, void * value, int* flag){ - return MPI_SUCCESS; -} - template int Keyval::attr_delete(int keyval){ smpi_key_elem elem = T::keyvals_.at(keyval); if(elem==nullptr) return MPI_ERR_ARG; elem->refcount--; void * value = nullptr; - int flag; + int flag=0; if(this->attr_get(keyval, &value, &flag)==MPI_SUCCESS){ int ret = call_deleter((T*)this, elem, keyval,value,&flag); if(ret!=MPI_SUCCESS) @@ -128,7 +123,7 @@ template int Keyval::attr_put(int keyval, void* attr_value){ return MPI_ERR_ARG; elem->refcount++; void * value = nullptr; - int flag; + int flag=0; this->attr_get(keyval, &value, &flag); if(flag!=0){ int ret = call_deleter((T*)this, elem, keyval,value,&flag); @@ -141,7 +136,7 @@ template int Keyval::attr_put(int keyval, void* attr_value){ template void Keyval::cleanup_attr(){ if(!attributes_.empty()){ - int flag; + int flag=0; for(auto it = attributes_.begin(); it != attributes_.end(); it++){ try{ smpi_key_elem elem = T::keyvals_.at((*it).first); -- 2.20.1