mirror of
https://github.com/monero-project/monero.git
synced 2026-06-12 19:11:36 -07:00
Merge pull request #10483
0617f43fix: warning: ignored-attributes (tobtoht)2cf3e27fix: warning: unused-result (tobtoht)d8f27befix: warning: unused-function (tobtoht)ffbb0ccfix: warning: unused-const-variable (tobtoht)57975abfix: warning: deprecated-declarations (tobtoht)3294b8efix: warning: unused-variable (tobtoht)20f6f5ffix: warning: unused-lambda-capture (tobtoht)37e76ecfix: warning: inconsistent-missing-override (tobtoht)
This commit is contained in:
@@ -38,6 +38,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
Success sc;
|
||||
sc.set_message("test");
|
||||
sc.SerializeToOstream(&std::cerr);
|
||||
if (!sc.SerializeToOstream(&std::cerr)) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -686,7 +686,8 @@ std::string get_hr_ssl_fingerprint_from_file(const std::string& cert_path, const
|
||||
const boost::system::error_code err_code(errno, boost::system::system_category());
|
||||
throw boost::system::system_error(err_code, "Failed to open certificate file '" + cert_path + "'");
|
||||
}
|
||||
std::unique_ptr<FILE, decltype(&fclose)> file(fp, &fclose);
|
||||
auto _fclose = [](FILE* f){ if (f) fclose(f); };
|
||||
std::unique_ptr<FILE, decltype(_fclose)> file(fp, _fclose);
|
||||
|
||||
// Extract certificate structure from file
|
||||
X509* ssl_cert_handle = PEM_read_X509(file.get(), NULL, NULL, NULL);
|
||||
|
||||
@@ -337,7 +337,7 @@ public:
|
||||
|
||||
void pop_block(block& blk, std::vector<transaction>& txs) override;
|
||||
|
||||
bool can_thread_bulk_indices() const { return true; }
|
||||
bool can_thread_bulk_indices() const override { return true; }
|
||||
|
||||
/**
|
||||
* @brief return a histogram of outputs on the blockchain
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include "CryptonightR_JIT.h"
|
||||
#include "CryptonightR_template.h"
|
||||
|
||||
static const uint8_t prologue[] = {
|
||||
#if defined __i386 || defined __x86_64__
|
||||
static const uint8_t prologue[] = {
|
||||
0x4C, 0x8B, 0xD7, // mov r10, rdi
|
||||
0x53, // push rbx
|
||||
0x55, // push rbp
|
||||
@@ -30,11 +30,9 @@ static const uint8_t prologue[] = {
|
||||
0x41, 0x8B, 0x42, 0x18, // mov eax, DWORD PTR [r10+24]
|
||||
0x41, 0x8B, 0x52, 0x1C, // mov edx, DWORD PTR [r10+28]
|
||||
0x45, 0x8B, 0x4A, 0x20, // mov r9d, DWORD PTR [r10+32]
|
||||
#endif
|
||||
};
|
||||
|
||||
static const uint8_t epilogue[] = {
|
||||
#if defined __i386 || defined __x86_64__
|
||||
0x49, 0x8B, 0xE3, // mov rsp, r11
|
||||
0x41, 0x89, 0x1A, // mov DWORD PTR [r10], ebx
|
||||
0x41, 0x89, 0x72, 0x04, // mov DWORD PTR [r10+4], esi
|
||||
@@ -44,8 +42,8 @@ static const uint8_t epilogue[] = {
|
||||
0x5D, // pop rbp
|
||||
0x5B, // pop rbx
|
||||
0xC3, // ret
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
#define APPEND_CODE(src, size) \
|
||||
do { \
|
||||
|
||||
@@ -66,21 +66,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#endif
|
||||
/* Argon2 Team - End Code */
|
||||
|
||||
static FORCE_INLINE uint32_t load32(const void *src) {
|
||||
#if defined(NATIVE_LITTLE_ENDIAN)
|
||||
uint32_t w;
|
||||
memcpy(&w, src, sizeof w);
|
||||
return w;
|
||||
#else
|
||||
const uint8_t *p = (const uint8_t *)src;
|
||||
uint32_t w = *p++;
|
||||
w |= (uint32_t)(*p++) << 8;
|
||||
w |= (uint32_t)(*p++) << 16;
|
||||
w |= (uint32_t)(*p++) << 24;
|
||||
return w;
|
||||
#endif
|
||||
}
|
||||
|
||||
static FORCE_INLINE uint64_t load64_native(const void *src) {
|
||||
uint64_t w;
|
||||
memcpy(&w, src, sizeof w);
|
||||
@@ -150,36 +135,6 @@ static FORCE_INLINE void store64(void *dst, uint64_t w) {
|
||||
|
||||
/// BEGIN: blake2-impl.h
|
||||
|
||||
static FORCE_INLINE uint64_t load48(const void *src) {
|
||||
const uint8_t *p = (const uint8_t *)src;
|
||||
uint64_t w = *p++;
|
||||
w |= (uint64_t)(*p++) << 8;
|
||||
w |= (uint64_t)(*p++) << 16;
|
||||
w |= (uint64_t)(*p++) << 24;
|
||||
w |= (uint64_t)(*p++) << 32;
|
||||
w |= (uint64_t)(*p++) << 40;
|
||||
return w;
|
||||
}
|
||||
|
||||
static FORCE_INLINE void store48(void *dst, uint64_t w) {
|
||||
uint8_t *p = (uint8_t *)dst;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
}
|
||||
|
||||
static FORCE_INLINE uint32_t rotr32(const uint32_t w, const unsigned c) {
|
||||
return (w >> c) | (w << (32 - c));
|
||||
}
|
||||
|
||||
static FORCE_INLINE uint64_t rotr64(const uint64_t w, const unsigned c) {
|
||||
return (w >> c) | (w << (64 - c));
|
||||
}
|
||||
|
||||
@@ -224,9 +224,6 @@ bool start_service(
|
||||
{
|
||||
tools::msg_writer() << "Starting service";
|
||||
|
||||
SERVICE_STATUS_PROCESS service_status = {};
|
||||
DWORD unused = 0;
|
||||
|
||||
service_handle p_manager{
|
||||
OpenSCManager(
|
||||
nullptr
|
||||
@@ -353,7 +350,6 @@ bool uninstall_service(
|
||||
return false;
|
||||
}
|
||||
|
||||
SERVICE_STATUS status = {};
|
||||
if (!DeleteService(p_service.get()))
|
||||
{
|
||||
tools::fail_msg_writer() << "Couldn't uninstall service: " << get_last_error();
|
||||
|
||||
@@ -71,9 +71,9 @@ namespace trezor
|
||||
|
||||
google::protobuf::Message * MessageMapper::get_message(const std::string & msg_name) {
|
||||
// Each package instantiation so lookup works
|
||||
hw::trezor::messages::common::Success::default_instance();
|
||||
hw::trezor::messages::management::Cancel::default_instance();
|
||||
hw::trezor::messages::monero::MoneroGetAddress::default_instance();
|
||||
(void)hw::trezor::messages::common::Success::default_instance();
|
||||
(void)hw::trezor::messages::management::Cancel::default_instance();
|
||||
(void)hw::trezor::messages::monero::MoneroGetAddress::default_instance();
|
||||
|
||||
#ifdef WITH_TREZOR_DEBUGGING
|
||||
hw::trezor::messages::debug::DebugLinkDecision::default_instance();
|
||||
|
||||
@@ -1112,7 +1112,7 @@ namespace nodetool
|
||||
MDEBUG("[node] sending stop signal");
|
||||
for (auto& zone : m_network_zones)
|
||||
{
|
||||
const auto close_all_connections = [&, this]()
|
||||
const auto close_all_connections = [&]()
|
||||
{
|
||||
std::list<boost::uuids::uuid> connection_ids;
|
||||
zone.second.m_net_server.get_config_object().foreach_connection([&](const p2p_connection_context& cntxt) {
|
||||
|
||||
@@ -4095,7 +4095,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
|
||||
// "I had to reorder some code to fix... a timing info leak IIRC. In turn, this undid something I had fixed before, ... a subtle race condition with the txpool.
|
||||
// It was pretty subtle IIRC, and so I needed time to think about how to refix it after the move, and I never got to it."
|
||||
// https://github.com/monero-project/monero/pull/6097
|
||||
bool refreshed = false;
|
||||
// bool refreshed = false;
|
||||
std::shared_ptr<std::map<std::pair<uint64_t, uint64_t>, size_t>> output_tracker_cache;
|
||||
hw::device &hwdev = m_account.get_device();
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ using testing::Types;
|
||||
|
||||
typedef Types<BlockchainLMDB> implementations;
|
||||
|
||||
TYPED_TEST_CASE(BlockchainDBTest, implementations);
|
||||
TYPED_TEST_SUITE(BlockchainDBTest, implementations);
|
||||
|
||||
TYPED_TEST(BlockchainDBTest, OpenAndClose)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user