Explorar el Código

Fix compile error in common.cc

Jeffrey Walton hace 7 años
padre
commit
5193bedb41
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/google/protobuf/stubs/common.cc

+ 2 - 1
src/google/protobuf/stubs/common.cc

@@ -354,7 +354,8 @@ struct ShutdownData {
 };
 
 static void RunZeroArgFunc(const void* arg) {
-  reinterpret_cast<void (*)()>(const_cast<void*>(arg))();
+  void (*func)() = reinterpret_cast<void (*)()>(const_cast<void*>(arg));
+  func();
 }
 
 void OnShutdown(void (*func)()) {