Fix compile error and warning with gcc
This commit is contained in:
parent
f0d2c9f94b
commit
22a89ff7a6
|
@ -303,7 +303,7 @@ int Client::connect() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
addrinfo *addr;
|
addrinfo *addr = nullptr;
|
||||||
while (next_addr) {
|
while (next_addr) {
|
||||||
addr = next_addr;
|
addr = next_addr;
|
||||||
next_addr = next_addr->ai_next;
|
next_addr = next_addr->ai_next;
|
||||||
|
@ -317,6 +317,8 @@ int Client::connect() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(addr);
|
||||||
|
|
||||||
current_addr = addr;
|
current_addr = addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include "nghttp2_config.h"
|
#include "nghttp2_config.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
Loading…
Reference in New Issue