Fix GCC CE and warnings.

GitOrigin-RevId: 21c7aa0f95f6534c8d8f1515fc93c67b55bb7998
This commit is contained in:
levlam 2019-07-22 07:05:50 +03:00
parent 20503e04d2
commit 5de928006b
5 changed files with 9 additions and 4 deletions

View File

@ -97,7 +97,7 @@ td::Result<TlsInfo> test_tls(const td::string &url) {
// LOG(ERROR) << td::format::as_hex_dump<0>(td::Slice(request));
socket.write(request);
TRY_STATUS(socket.write(request));
TlsInfo info;
auto end_time = td::Time::now() + 3;

View File

@ -212,7 +212,7 @@ static ActorOwn<> get_simple_config_impl(Promise<SimpleConfigResult> promise, in
SimpleConfigResult res;
res.r_http_date = HttpDate::parse_http_date(http_query->get_header("date").str());
res.r_config = decode_config(http_query->content_);
return res;
return std::move(res);
}());
}),
std::move(url), std::vector<std::pair<string, string>>({{"Host", std::move(host)}}), timeout, ttl, prefer_ipv6,
@ -277,7 +277,7 @@ ActorOwn<> get_simple_config_google_dns(Promise<SimpleConfigResult> promise, con
}
return decode_config(data);
}();
return res;
return std::move(res);
}());
}),
PSTRING() << "https://www.google.com/resolve?name=" << url_encode(name) << "&type=16",

View File

@ -6784,6 +6784,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
})) {
return;
}
break;
case 'd':
if (!is_bot && set_boolean_option("disable_contact_registered_notifications")) {
return;

View File

@ -77,7 +77,9 @@ void print_backtrace_gdb(void) {
#if TD_LINUX && defined(PR_SET_PTRACER)
if (need_set_ptracer) {
char c;
read(fds[0], &c, 1);
if (read(fds[0], &c, 1) < 0) {
signal_safe_write("Failed to read from pipe\n");
}
}
#endif
dup2(2, 1); // redirect output to stderr

View File

@ -12,6 +12,8 @@ class Stacktrace {
public:
struct PrintOptions {
bool use_gdb = false;
PrintOptions() {
}
};
static void print_to_stderr(const PrintOptions &options = PrintOptions());
};