diff options
author | Jack Lloyd <[email protected]> | 2019-06-29 16:16:21 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-06-29 17:11:19 -0400 |
commit | 8b8745236368c70a82db2b19feeed5e9f9b59c5b (patch) | |
tree | 1495a04a7e6f117e2cacd69ff0f7b2c4a31ddee9 /src/lib/compat | |
parent | 5922b1c3abf00c0e22e86498e1ee3a51e5343b0f (diff) |
Fix various MSVC warnings
Diffstat (limited to 'src/lib/compat')
-rw-r--r-- | src/lib/compat/sodium/sodium.h | 2 | ||||
-rw-r--r-- | src/lib/compat/sodium/sodium_utils.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/compat/sodium/sodium.h b/src/lib/compat/sodium/sodium.h index 4bb37e974..f43b88abb 100644 --- a/src/lib/compat/sodium/sodium.h +++ b/src/lib/compat/sodium/sodium.h @@ -18,7 +18,7 @@ namespace Botan { namespace Sodium { // sodium/randombytes.h -enum Sodium_Constants { +enum Sodium_Constants : size_t { SODIUM_SIZE_MAX = 0xFFFFFFFF, crypto_aead_chacha20poly1305_ABYTES = 16, diff --git a/src/lib/compat/sodium/sodium_utils.cpp b/src/lib/compat/sodium/sodium_utils.cpp index 208355583..4b7afdb3d 100644 --- a/src/lib/compat/sodium/sodium_utils.cpp +++ b/src/lib/compat/sodium/sodium_utils.cpp @@ -133,7 +133,7 @@ void Sodium::sodium_free(void* ptr) uint8_t* p = static_cast<uint8_t*>(ptr) - 8; const uint64_t len = load_le<uint64_t>(p, 0); - secure_scrub_memory(ptr, len); + secure_scrub_memory(ptr, static_cast<size_t>(len)); std::free(p); } |