aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-31 08:23:30 -0400
committerJack Lloyd <[email protected]>2017-08-31 08:23:30 -0400
commit7fecb1254232311d5f2ca62f9cda1e12a4b2558c (patch)
tree2e2cd8ef8ca016310d4cc9aa6bee7abc96c39e2f /src/tests
parentdf4287c3c763de14b262ed39d54b3de552adbefb (diff)
More MSVC warnings fixes
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_ffi.cpp4
-rw-r--r--src/tests/test_gf2m.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
index d94fae7ba..41fa3a044 100644
--- a/src/tests/test_ffi.cpp
+++ b/src/tests/test_ffi.cpp
@@ -816,7 +816,7 @@ class FFI_Unit_Tests : public Test
uint32_t x_32;
TEST_FFI_OK(botan_mp_to_uint32, (x, &x_32));
- result.test_eq("botan_mp_to_uint32", x, 0x103);
+ result.test_eq("botan_mp_to_uint32", x, static_cast<size_t>(0x103));
TEST_FFI_RC(1, botan_mp_get_bit, (x, 1));
TEST_FFI_RC(0, botan_mp_get_bit, (x, 87));
@@ -1444,7 +1444,7 @@ class FFI_Unit_Tests : public Test
TEST_FFI_OK(botan_pk_op_sign_destroy, (signer));
}
- botan_pk_op_verify_t verifier;
+ botan_pk_op_verify_t verifier = nullptr;
if(signature.size() > 0 && TEST_FFI_OK(botan_pk_op_verify_create, (&verifier, pub, sm2_ident.c_str(), 0)))
{
diff --git a/src/tests/test_gf2m.cpp b/src/tests/test_gf2m.cpp
index c8110034e..9bb572c4e 100644
--- a/src/tests/test_gf2m.cpp
+++ b/src/tests/test_gf2m.cpp
@@ -45,7 +45,7 @@ class GF2m_Tests : public Test
for(size_t i = 0; i <= field.gf_ord(); ++i)
{
- gf2m a = i;
+ gf2m a = static_cast<gf2m>(i);
result.test_eq("square vs multiply",
static_cast<size_t>(field.gf_square(a)),