From a0a2b66b3b6ba9dd94f924ef9639570f4a4ae2b6 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Wed, 27 Apr 2016 15:21:26 -0700 Subject: Add explicit static_cast operations to eliminate implicit cast compiler warnings. --- src/lib/modes/mode_pad/mode_pad.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/modes/mode_pad/mode_pad.cpp') diff --git a/src/lib/modes/mode_pad/mode_pad.cpp b/src/lib/modes/mode_pad/mode_pad.cpp index ecf241821..0f1df9e8a 100644 --- a/src/lib/modes/mode_pad/mode_pad.cpp +++ b/src/lib/modes/mode_pad/mode_pad.cpp @@ -37,7 +37,7 @@ void PKCS7_Padding::add_padding(secure_vector& buffer, size_t last_byte_pos, size_t block_size) const { - const byte pad_value = block_size - last_byte_pos; + const byte pad_value = static_cast(block_size - last_byte_pos); for(size_t i = 0; i != pad_value; ++i) buffer.push_back(pad_value); @@ -67,7 +67,7 @@ void ANSI_X923_Padding::add_padding(secure_vector& buffer, size_t last_byte_pos, size_t block_size) const { - const byte pad_value = block_size - last_byte_pos; + const byte pad_value = static_cast(block_size - last_byte_pos); for(size_t i = last_byte_pos; i < block_size; ++i) buffer.push_back(0); -- cgit v1.2.3