Skip to content

Commit

Permalink
[Core][TReentrantRWLock] Declare undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
stwunsch authored and pcanal committed Sep 18, 2020
1 parent 7612ef8 commit 8c858b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/thread/src/TReentrantRWLock.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ using namespace ROOT;
#define R__MAYBE_ASSERT_WITH_LOCAL_LOCK(where, msg, what) \
{ \
std::unique_lock<MutexT> lock(fMutex); \
auto local = fRecurseCounts.GetLocal(); \
if (!(what)) \
Error(where, "%s", msg); \
}
Expand Down Expand Up @@ -322,7 +323,7 @@ TReentrantRWLock<MutexT, RecurseCountsT>::Rewind(const State &earlierState) {
if (pStateDelta->fDeltaWriteRecurse != 0) {
R__MAYBE_ASSERT_WITH_LOCAL_LOCK("TReentrantRWLock::Rewind",
"Lock rewinded from a thread that does not own the Write lock",
fWriter && fRecurseCounts.IsNotCurrentWriter(local));
fWriter && fRecurseCounts.IsNotCurrentWriter(local)); // local defined in macro

// Claim a recurse-state +1 to be able to call Unlock() below.
fRecurseCounts.fWriteRecurse = typedState.fWriteRecurse + 1;
Expand Down

0 comments on commit 8c858b0

Please sign in to comment.