Commit 5911efa1 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 4

Deal with a couple of warnings from MSVC

Summary: MSVC is warning that `client` may be uninitialized, which is possible if the callback doesn't actually set them for some reason. Solve that by explicitly initializing it to `nullptr`. Also deal with the warning about the initialization of `dynamic::array` using braced syntax by not using that syntax.

Reviewed By: yfeldblum

Differential Revision: D3387782

fbshipit-source-id: e4d25ad32e99a73d7d062be9a2f2b5bde5d17396
parent 65b5c3d2
......@@ -79,7 +79,7 @@ static std::string decodeString(Cursor& curs) {
}
static dynamic decodeArray(Cursor& curs) {
dynamic arr{};
dynamic arr = dynamic::array();
auto size = decodeInt(curs);
while (size-- > 0) {
arr.push_back(parseBser(curs));
......
......@@ -591,8 +591,8 @@ int SSLContext::selectNextProtocolCallback(SSL* ssl,
<< "client should be deterministic in selecting protocols.";
}
unsigned char *client;
unsigned int client_len;
unsigned char* client = nullptr;
unsigned int client_len = 0;
bool filtered = false;
auto cpf = ctx->getClientProtocolFilterCallback();
if (cpf) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment