[interprocess] Suspicious code in detail/segment_manager_helper.hpp

Hello, this file contains at line 384 the following method of index_data: void *value() const { return static_cast<void>(detail::get_pointer(m_ptr)); } Either the declaration of the return value or the cast seems to be wrong. Markus

Markus Schöpflin wrote:
Hello,
this file contains at line 384 the following method of index_data:
void *value() const { return static_cast<void>(detail::get_pointer(m_ptr)); }
Either the declaration of the return value or the cast seems to be wrong.
Attached patch fixes the problem and clears a number of test failures on Tru64/CXX. OK to commit? Markus Index: interprocess/detail/segment_manager_helper.hpp =================================================================== --- interprocess/detail/segment_manager_helper.hpp (revision 50312) +++ interprocess/detail/segment_manager_helper.hpp (working copy) @@ -382,7 +382,7 @@ index_data(void *ptr) : m_ptr(ptr){} void *value() const - { return static_cast<void>(detail::get_pointer(m_ptr)); } + { return static_cast<void *>(detail::get_pointer(m_ptr)); } }; template<class MemoryAlgorithm>
participants (1)
-
Markus Schöpflin