MoneroOcean / xmrig

Monero (rx/0, rx/wow, rx/loki, defyx, rx/arq, rx/sfx, rx/keva, cn/0, cn/1, cn/2, cn/r, cn/fast, cn/half, cn/xao, cn/rto, cn/rwz, cn/zls, cn/double, cn/gpu, cn-lite/0, cn-lite/1, cn-heavy/0, cn-heavy/tube, cn-heavy/xhv, cn-pico, cn-pico/tlo, argon2/chukwa, argon2/wrkz, astrobwt) CPU/GPU miner
https://moneroocean.stream
GNU General Public License v3.0
274 stars 84 forks source link

Fix unused warning with C++17 [[maybe_unused]] decoration #143

Closed Spudz76 closed 4 months ago

Spudz76 commented 4 months ago

Get rid of the warning:

In file included from /usr/src/xmrig/src/crypto/cn/CnHash.cpp:29:
/usr/src/xmrig/src/crypto/cn/CryptoNight_x86.h: In function ‘void do_flex_skein_hash(const uint8_t*, size_t, uint8_t*)’:
/usr/src/xmrig/src/crypto/cn/CryptoNight_x86.h:80:9: warning: unused variable ‘r’ [-Wunused-variable]
   80 |     int r = skein_hash(512, input, 8 * len, (uint8_t*)output);
      |         ^
Spudz76 commented 4 months ago

Tested on:

MoneroOcean commented 4 months ago

Let me try that. Hopefully it will not break EL7 build with old gcc (I think it will).

MoneroOcean commented 4 months ago

I was wrong. It worked fine!