@@ -48,7 +48,7 @@ void opdi::MutexOmpLogic::checkKind(MutexKind kind) {
4848
4949void opdi::MutexOmpLogic::waitReverseFunc (void * dataPtr) {
5050
51- Data* data = ( Data*) dataPtr;
51+ Data* data = static_cast < Data*>( dataPtr) ;
5252
5353 #if OPDI_OMP_LOGIC_INSTRUMENT
5454 for (auto & instrument : ompLogicInstruments) {
@@ -74,13 +74,13 @@ void opdi::MutexOmpLogic::waitReverseFunc(void* dataPtr) {
7474}
7575
7676void opdi::MutexOmpLogic::waitDeleteFunc (void * dataPtr) {
77- Data* data = ( Data*) dataPtr;
77+ Data* data = static_cast < Data*>( dataPtr) ;
7878 delete data;
7979}
8080
8181void opdi::MutexOmpLogic::decrementReverseFunc (void * dataPtr) {
8282
83- Data* data = ( Data*) dataPtr;
83+ Data* data = static_cast < Data*>( dataPtr) ;
8484
8585 #ifdef __SANITIZE_THREAD__
8686 ANNOTATE_RWLOCK_RELEASED (&MutexOmpLogic::tsanDummies[data->kind ][data->waitId ], true );
@@ -98,7 +98,7 @@ void opdi::MutexOmpLogic::decrementReverseFunc(void* dataPtr) {
9898}
9999
100100void opdi::MutexOmpLogic::decrementDeleteFunc (void * dataPtr) {
101- Data* data = ( Data*) dataPtr;
101+ Data* data = static_cast < Data*>( dataPtr) ;
102102 delete data;
103103}
104104
@@ -162,7 +162,7 @@ void opdi::MutexOmpLogic::onMutexAcquired(MutexKind kind, WaitId waitId) {
162162
163163 // push decrement handle
164164 Handle* handle = new Handle;
165- handle->data = ( void *) data;
165+ handle->data = static_cast < void *>( data) ;
166166 handle->reverseFunc = MutexOmpLogic::decrementReverseFunc;
167167 handle->deleteFunc = MutexOmpLogic::decrementDeleteFunc;
168168
@@ -205,7 +205,7 @@ void opdi::MutexOmpLogic::onMutexReleased(MutexKind kind, WaitId waitId) {
205205
206206 // push wait handle
207207 Handle* handle = new Handle;
208- handle->data = ( void *) data;
208+ handle->data = static_cast < void *>( data) ;
209209 handle->reverseFunc = MutexOmpLogic::waitReverseFunc;
210210 handle->deleteFunc = MutexOmpLogic::waitDeleteFunc;
211211
@@ -266,16 +266,16 @@ void* opdi::MutexOmpLogic::exportState() {
266266 for (std::size_t mutexKind = 0 ; mutexKind < nMutexKind; ++mutexKind) {
267267 (*state)[mutexKind] = this ->recordings [mutexKind].counters ;
268268 }
269- return ( void *) state;
269+ return static_cast < void *>( state) ;
270270}
271271
272272void opdi::MutexOmpLogic::freeState (void * statePtr) {
273- State* state = ( State*) statePtr;
273+ State* state = static_cast < State*>( statePtr) ;
274274 delete state;
275275}
276276
277277void opdi::MutexOmpLogic::recoverState (void * statePtr) {
278- State* state = ( State*) statePtr;
278+ State* state = static_cast < State*>( statePtr) ;
279279 for (std::size_t mutexKind = 0 ; mutexKind < nMutexKind; ++mutexKind) {
280280 this ->recordings [mutexKind].counters = (*state)[mutexKind];
281281 }
0 commit comments