Fix some warnings.
This commit is contained in:
parent
34cf869c02
commit
57de0c4967
@ -653,6 +653,8 @@ void AesCtrState::encrypt(Slice from, MutableSlice to) {
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
ctx_->evp_.encrypt(from.ubegin(), to.ubegin(), narrow_cast<int>(from.size()));
|
||||
#else
|
||||
auto from_ptr = from.ubegin();
|
||||
auto to_ptr = to.ubegin();
|
||||
for (size_t i = 0; i < from.size(); i++) {
|
||||
if (ctx_->current_pos_ == 0) {
|
||||
AES_encrypt(ctx_->counter_, ctx_->encrypted_counter_, &ctx_->aes_key_);
|
||||
@ -662,7 +664,7 @@ void AesCtrState::encrypt(Slice from, MutableSlice to) {
|
||||
}
|
||||
}
|
||||
}
|
||||
to[i] = from[i] ^ ctx_->encrypted_counter_[ctx_->current_pos_];
|
||||
to_ptr[i] = static_cast<uint8>(from_ptr[i] ^ ctx_->encrypted_counter_[ctx_->current_pos_]);
|
||||
ctx_->current_pos_ = (ctx_->current_pos_ + 1) & 15;
|
||||
}
|
||||
#endif
|
||||
|
@ -91,6 +91,8 @@ int Clocks::tz_offset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
static int init_tz_offset = Clocks::tz_offset();
|
||||
namespace detail {
|
||||
int init_tz_offset_private = Clocks::tz_offset();
|
||||
} // namespace detail
|
||||
|
||||
} // namespace td
|
||||
|
Loading…
Reference in New Issue
Block a user