From ab0f01c381c16ed61b8258582869912d4c38cbb7 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 28 Jun 2017 11:57:21 +0200 Subject: Adjust code to make compilation under MSVC 2017 --- include/stick10_commands.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/stick10_commands.h') diff --git a/include/stick10_commands.h b/include/stick10_commands.h index e863328..8f3ceef 100644 --- a/include/stick10_commands.h +++ b/include/stick10_commands.h @@ -130,7 +130,7 @@ class WriteToHOTPSlot : Command { ss << std::hex << std::setw(2) << std::setfill('0')<< (int) i << " " ; ss << std::endl; ss << "slot_counter:\t[" << (int)slot_counter << "]\t" - << ::nitrokey::misc::hexdump((const char *)(&slot_counter), sizeof slot_counter, false); + << ::nitrokey::misc::hexdump((const uint8_t *)(&slot_counter), sizeof slot_counter, false); return ss.str(); } @@ -334,7 +334,7 @@ class ReadSlot : Command { ss << std::hex << std::setw(2) << std::setfill('0')<< (int) i << " " ; ss << std::endl; ss << "slot_counter:\t[" << (int)slot_counter << "]\t" - << ::nitrokey::misc::hexdump((const char *)(&slot_counter), sizeof slot_counter, false); + << ::nitrokey::misc::hexdump((const uint8_t *)(&slot_counter), sizeof slot_counter, false); return ss.str(); } } __packed; @@ -372,13 +372,13 @@ class GetStatus : Command { ss << "firmware_version:\t" << "[" << firmware_version << "]" << "\t" << ::nitrokey::misc::hexdump( - (const char *)(&firmware_version), sizeof firmware_version, false); + (const uint8_t *)(&firmware_version), sizeof firmware_version, false); ss << "card_serial_u32:\t" << std::hex << card_serial_u32 << std::endl; ss << "card_serial:\t" - << ::nitrokey::misc::hexdump((const char *)(card_serial), + << ::nitrokey::misc::hexdump((const uint8_t *)(card_serial), sizeof card_serial, false); ss << "general_config:\t" - << ::nitrokey::misc::hexdump((const char *)(general_config), + << ::nitrokey::misc::hexdump((const uint8_t *)(general_config), sizeof general_config, false); ss << "numlock:\t" << (int)numlock << std::endl; ss << "capslock:\t" << (int)capslock << std::endl; -- cgit v1.2.1