Commit b608af6c3a2502ae61b94416a482c2e0672286a4

Edward Thomson 2021-11-14T07:23:01

Merge pull request #6116 from lhchavez/drop-volatile-qualifier-in-atomic-exchange

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/thread.h b/src/thread.h
index 82eb7fc..4bbac9f 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -180,7 +180,7 @@ GIT_INLINE(volatile void *) git_atomic__swap(
 #if defined(GIT_WIN32)
 	return InterlockedExchangePointer(ptr, newval);
 #elif defined(GIT_BUILTIN_ATOMIC)
-	void * volatile foundval = NULL;
+	void * foundval = NULL;
 	__atomic_exchange(ptr, &newval, &foundval, __ATOMIC_SEQ_CST);
 	return foundval;
 #elif defined(GIT_BUILTIN_SYNC)