diff options
author | Muxi Yan <muxi@users.noreply.github.com> | 2017-11-27 16:28:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 16:28:44 -0800 |
commit | 9f6a6f3f1a1ab44834ef5d4c3e4601e07c6287ed (patch) | |
tree | 7dc0bbd5d2d12183cce0d4ab049c6e235e8e27e6 | |
parent | fbe8ff657ccb742daedae11a1029f5628de07ce7 (diff) |
Fix compiler error on need_to_unref_constructed
`need_to_unref_constructed` is not initialized, making Xcode compiler [complain on Sierra](https://sponge-qa.corp.google.com/invocation?tab=Kokoro&id=0ff33b71-2f61-4ad6-837e-5e43043c282a&searchFor=):
```
/Volumes/BuildData/tmpfs/src/github/grpc/workspace_objc_macos_dbg_native/src/core/ext/filters/client_channel/subchannel_index.cc:206:7: error: variable 'need_to_unref_constructed' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
```
-rw-r--r-- | src/core/ext/filters/client_channel/subchannel_index.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel_index.cc b/src/core/ext/filters/client_channel/subchannel_index.cc index ae39ca394e..1624643d0b 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.cc +++ b/src/core/ext/filters/client_channel/subchannel_index.cc @@ -163,7 +163,7 @@ grpc_subchannel* grpc_subchannel_index_register(grpc_exec_ctx* exec_ctx, grpc_subchannel_key* key, grpc_subchannel* constructed) { grpc_subchannel* c = nullptr; - bool need_to_unref_constructed; + bool need_to_unref_constructed = false; while (c == nullptr) { need_to_unref_constructed = false; |