diff --git a/src/intrin_portable.h b/src/intrin_portable.h index 8c09ae8..59d8844 100644 --- a/src/intrin_portable.h +++ b/src/intrin_portable.h @@ -296,14 +296,14 @@ FORCE_INLINE __m128ll vrev(__m128i v){ #endif } -FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) { +FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128, rx_vec_i128) { __m128ll _v = vrev(v); __m128ll _rkey = vrev(rkey); __m128ll result = vrev((__m128i)__builtin_crypto_vcipher(_v,_rkey)); return (rx_vec_i128)result; } -FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) { +FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128, rx_vec_i128) { __m128ll _v = vrev(v); __m128ll zero = (__m128ll){0}; __m128ll out = vrev((__m128i)__builtin_crypto_vncipher(_v,zero)); @@ -722,11 +722,11 @@ static const char* platformError = "Platform doesn't support hardware AES"; #include -FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) { +FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128, rx_vec_i128) { throw std::runtime_error(platformError); } -FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) { +FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128, rx_vec_i128) { throw std::runtime_error(platformError); } diff --git a/src/randomx.h b/src/randomx.h index 64d1806..30f5798 100644 --- a/src/randomx.h +++ b/src/randomx.h @@ -50,11 +50,15 @@ typedef enum { RANDOMX_FLAG_ARGON2_AVX2 = 64, RANDOMX_FLAG_ARGON2 = 96 } randomx_flags; - +#if defined(__cplusplus) +struct randomx_dataset; +struct randomx_cache; +class randomx_vm; +#else typedef struct randomx_dataset randomx_dataset; typedef struct randomx_cache randomx_cache; typedef struct randomx_vm randomx_vm; - +#endif #if defined(__cplusplus) diff --git a/src/virtual_machine.hpp b/src/virtual_machine.hpp index 02979a2..c28eb21 100644 --- a/src/virtual_machine.hpp +++ b/src/virtual_machine.hpp @@ -28,6 +28,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once +#ifdef _MSC_VER +#pragma warning(disable : 4324) +#endif + #include #include "common.hpp" #include "program.hpp" @@ -39,8 +43,8 @@ public: virtual void allocate() = 0; virtual void getFinalResult(void* out, size_t outSize) = 0; virtual void hashAndFill(void* out, size_t outSize, uint64_t *fill_state) = 0; - virtual void setDataset(randomx_dataset* dataset) { } - virtual void setCache(randomx_cache* cache) { } + virtual void setDataset(randomx_dataset* /*dataset*/) { } + virtual void setCache(randomx_cache* /*cache*/) { } virtual void initScratchpad(void* seed) = 0; virtual void run(void* seed) = 0; void resetRoundingMode();