0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

Merge bitcoin/bitcoin#24772: refactor: Use [[maybe_unused]] attribute

07ddecb84e refactor: Use [[maybe_unused]] attribute (Hennadii Stepanov)
55e0fc8df9 refactor: Drop unneeded workarounds aimed to silence unused warning (Hennadii Stepanov)

Pull request description:

  This change is required for bitcoin/bitcoin#24773 as it prevents MSVC yelling about "warning C4551: function call missing argument list".

  But it is useful by itself as it makes code more concise and readable.

ACKs for top commit:
  Empact:
    Code review ACK 07ddecb84e
  laanwj:
    Code review ACK 07ddecb84e
  vincenzopalazzo:
    ACK 07ddecb84e
  w0xlt:
    ACK 07ddecb

Tree-SHA512: 01791855a9ba742202d5718203303af989fcb501b7cf2a24ac8d78e87487acca38f77bef264b8e27e41ad1ccf96e426725cf65bfd96ce2ac71c46b3792bed857
This commit is contained in:
laanwj 2022-04-19 15:57:30 +02:00
commit f8b2e9bcfc
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

@ -586,17 +586,9 @@ std::string SHA256AutoDetect()
bool have_sse4 = false; bool have_sse4 = false;
bool have_xsave = false; bool have_xsave = false;
bool have_avx = false; bool have_avx = false;
bool have_avx2 = false; [[maybe_unused]] bool have_avx2 = false;
bool have_x86_shani = false; [[maybe_unused]] bool have_x86_shani = false;
bool enabled_avx = false; [[maybe_unused]] bool enabled_avx = false;
(void)AVXEnabled;
(void)have_sse4;
(void)have_avx;
(void)have_xsave;
(void)have_avx2;
(void)have_x86_shani;
(void)enabled_avx;
uint32_t eax, ebx, ecx, edx; uint32_t eax, ebx, ecx, edx;
GetCPUID(1, 0, eax, ebx, ecx, edx); GetCPUID(1, 0, eax, ebx, ecx, edx);
@ -641,7 +633,7 @@ std::string SHA256AutoDetect()
ret += ",avx2(8way)"; ret += ",avx2(8way)";
} }
#endif #endif
#endif #endif // defined(USE_ASM) && defined(HAVE_GETCPUID)
#if defined(ENABLE_ARM_SHANI) && !defined(BUILD_BITCOIN_INTERNAL) #if defined(ENABLE_ARM_SHANI) && !defined(BUILD_BITCOIN_INTERNAL)
bool have_arm_shani = false; bool have_arm_shani = false;