From df4dea58ac77a7de084287fbbd0c4d7b01868d32 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 29 Nov 2019 12:51:08 -0500 Subject: Fix PKCS11 warnings --- src/tests/test_pkcs11_low_level.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tests/test_pkcs11_low_level.cpp b/src/tests/test_pkcs11_low_level.cpp index 6cf3dcdd0..89492210c 100644 --- a/src/tests/test_pkcs11_low_level.cpp +++ b/src/tests/test_pkcs11_low_level.cpp @@ -616,8 +616,8 @@ std::array dtemplate = { { static_cast(AttributeType::Class), &object_class, sizeof(object_class) }, { static_cast(AttributeType::Token), &btrue, sizeof(btrue) }, - { static_cast(AttributeType::Label), const_cast< char* >(label.c_str()), label.size() }, - { static_cast(AttributeType::Value), const_cast< char* >(data.c_str()), data.size() } + { static_cast(AttributeType::Label), const_cast(label.c_str()), static_cast(label.size()) }, + { static_cast(AttributeType::Value), const_cast(data.c_str()), static_cast(data.size()) } } }; @@ -766,7 +766,9 @@ Test::Result test_c_copy_object() std::string copied_label = "A copied data object"; - Attribute copy_attribute_values = { static_cast< CK_ATTRIBUTE_TYPE >(AttributeType::Label), const_cast< char* >(copied_label.c_str()), copied_label.size() }; + Attribute copy_attribute_values = { + static_cast(AttributeType::Label), const_cast(copied_label.c_str()), static_cast(copied_label.size()) + }; auto binder = std::bind(&LowLevel::C_CopyObject, *p11_low_level.get(), session_handle, object_handle, ©_attribute_values, 1, &copied_object_handle, std::placeholders::_1); -- cgit v1.2.3