1
0
Fork 0
forked from lthn/blockchain

crypto: fix some warnings

This commit is contained in:
sowle 2021-04-27 05:14:11 +03:00
parent 9c5088afd4
commit 1df36cb841
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 8 additions and 1 deletions

View file

@ -108,6 +108,13 @@ if(NOT MSVC AND NOT APPLE AND NOT CLANG) # TODO(unassigned): do we really need
target_compile_options(common PRIVATE -fno-var-tracking-assignments)
endif()
# disable specific warning in order not to touch original code by D. J. Bernstein
if(MSVC)
set_source_files_properties("crypto/chacha8_stream.c" PROPERTIES COMPILE_FLAGS "/wd4018")
else()
set_source_files_properties("crypto/chacha8_stream.c" PROPERTIES COMPILE_FLAGS "-Wno-sign-compare -Wno-strict-prototypes")
endif()
add_library(crypto ${CRYPTO})
add_library(currency_core ${CURRENCY_CORE})

View file

@ -27,5 +27,5 @@ void cn_fast_hash_old(const void *data, size_t length, char *hash)
void cn_fast_hash(const void *data, size_t length, char *hash)
{
keccak(data, (int)length, hash, HASH_SIZE);
keccak(data, (int)length, (uint8_t*)hash, HASH_SIZE);
}