Skip to content

Instantly share code, notes, and snippets.

diff --git a/protobuf-2.5.0/src/google/protobuf/stubs/once.cc b/protobuf-2.5.0/src/google/protobuf/stubs/once.cc
index 1e24b85..e9056ac 100644
--- a/protobuf-2.5.0/src/google/protobuf/stubs/once.cc
+++ b/protobuf-2.5.0/src/google/protobuf/stubs/once.cc
@@ -63,7 +63,7 @@ void SchedYield() {
} // namespace
void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure) {
- internal::AtomicWord state = internal::Acquire_Load(once);
+ internal::AtomicWord state = internal::Acquire_Load((volatile internal::Atomic32 *)once);