Fix compile error/warnings with gcc-4.7
This commit is contained in:
parent
5c96ecd77d
commit
ca3444c34c
|
@ -630,7 +630,8 @@ void renew_ticket_key_cb(struct ev_loop *loop, ev_timer *w, int revents) {
|
|||
new_key.hmac = EVP_sha256();
|
||||
new_key.hmac_keylen = EVP_MD_size(new_key.hmac);
|
||||
|
||||
assert(EVP_CIPHER_key_length(new_key.cipher) <= sizeof(new_key.data.enc_key));
|
||||
assert(static_cast<size_t>(EVP_CIPHER_key_length(new_key.cipher)) <=
|
||||
sizeof(new_key.data.enc_key));
|
||||
assert(new_key.hmac_keylen <= sizeof(new_key.data.hmac_key));
|
||||
|
||||
if (LOG_ENABLED(INFO)) {
|
||||
|
|
|
@ -171,7 +171,7 @@ read_tls_ticket_key_file(const std::vector<std::string> &files,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (fst.st_size != expectedlen) {
|
||||
if (static_cast<size_t>(fst.st_size) != expectedlen) {
|
||||
LOG(ERROR) << "tls-ticket-key-file: the expected file size is "
|
||||
<< expectedlen << ", the actual file size is " << fst.st_size;
|
||||
return nullptr;
|
||||
|
@ -184,7 +184,7 @@ read_tls_ticket_key_file(const std::vector<std::string> &files,
|
|||
}
|
||||
|
||||
f.read(buf, expectedlen);
|
||||
if (f.gcount() != expectedlen) {
|
||||
if (static_cast<size_t>(f.gcount()) != expectedlen) {
|
||||
LOG(ERROR) << "tls-ticket-key-file: want to read " << expectedlen
|
||||
<< " bytes but only read " << f.gcount() << " bytes from "
|
||||
<< file;
|
||||
|
@ -1836,7 +1836,7 @@ int parse_config(const char *opt, const char *optarg,
|
|||
return -1;
|
||||
}
|
||||
|
||||
included_set.emplace(optarg);
|
||||
included_set.insert(optarg);
|
||||
auto rv = load_config(optarg, included_set);
|
||||
included_set.erase(optarg);
|
||||
|
||||
|
|
Loading…
Reference in New Issue