Merge pull request #556 from mgiuca/fix-clang-warning

Fix "sometimes-uninitialized" warning on Windows Clang.
pull/569/head
Feng Xiao 10 years ago
commit c3cb53b8f4
  1. 2
      src/google/protobuf/compiler/subprocess.cc

@ -171,7 +171,7 @@ bool Subprocess::Communicate(const Message& input, Message* output,
DWORD wait_result = DWORD wait_result =
WaitForMultipleObjects(handle_count, handles, FALSE, INFINITE); WaitForMultipleObjects(handle_count, handles, FALSE, INFINITE);
HANDLE signaled_handle; HANDLE signaled_handle = NULL;
if (wait_result >= WAIT_OBJECT_0 && if (wait_result >= WAIT_OBJECT_0 &&
wait_result < WAIT_OBJECT_0 + handle_count) { wait_result < WAIT_OBJECT_0 + handle_count) {
signaled_handle = handles[wait_result - WAIT_OBJECT_0]; signaled_handle = handles[wait_result - WAIT_OBJECT_0];

Loading…
Cancel
Save