1
0

<fixed>(core): fixed codacy problem.

1. Consecutive return, break, continue, goto or throw statements are unnecessary.
2. Variable 'current' is assigned a value that is never used.
This commit is contained in:
Saturneric 2022-01-05 01:07:35 +08:00
parent 756b93eb73
commit 7b90fdce91
2 changed files with 1 additions and 3 deletions

View File

@ -209,13 +209,12 @@ gpgme_error_t GpgContext::test_passphrase_cb(void *opaque, const char *uid_hint,
} while (res > 0 && off != pass_len); } while (res > 0 && off != pass_len);
return off == pass_len ? 0 : gpgme_error_from_errno(errno); return off == pass_len ? 0 : gpgme_error_from_errno(errno);
return 0;
} }
gpgme_error_t GpgContext::test_status_cb(void *hook, const char *keyword, gpgme_error_t GpgContext::test_status_cb(void *hook, const char *keyword,
const char *args) { const char *args) {
LOG(INFO) << "keyword" << keyword; LOG(INFO) << "keyword" << keyword;
return 0; return GPG_ERR_NO_ERROR;
} }
} // namespace GpgFrontend } // namespace GpgFrontend

View File

@ -168,7 +168,6 @@ void GpgFrontend::GenKeyInfo::setKeySize(int m_key_size) {
void GpgFrontend::GenKeyInfo::setExpired( void GpgFrontend::GenKeyInfo::setExpired(
const boost::posix_time::ptime &m_expired) { const boost::posix_time::ptime &m_expired) {
using namespace boost::gregorian; using namespace boost::gregorian;
auto current = boost::posix_time::second_clock::local_time();
if (!isNonExpired()) { if (!isNonExpired()) {
GenKeyInfo::expired_ = m_expired; GenKeyInfo::expired_ = m_expired;
} }