diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build-data/cc/msvc.txt | 2 | ||||
-rw-r--r-- | src/math/bigint/big_code.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt index 24d91b3f3..a854a576d 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt @@ -12,7 +12,7 @@ no_debug_flags "/O2" debug_flags "/Od /Zi /DDEBUG" check_opt_flags "/O2 /D_CONSOLE" lang_flags "/EHs /GR" -warning_flags "/W3 /wd4275" +warning_flags "/W3 /wd4275 /wd4267" shared_flags "/DBOTAN_DLL=__declspec(dllexport)" dll_import_flags "__declspec(dllimport)" diff --git a/src/math/bigint/big_code.cpp b/src/math/bigint/big_code.cpp index 99cf25aa0..75a310a7c 100644 --- a/src/math/bigint/big_code.cpp +++ b/src/math/bigint/big_code.cpp @@ -33,7 +33,9 @@ void BigInt::encode(byte output[], const BigInt& n, Base base) const size_t output_size = n.encoded_size(Octal); for(size_t j = 0; j != output_size; ++j) { - output[output_size - 1 - j] = Charset::digit2char(copy % 8); + output[output_size - 1 - j] = + Charset::digit2char(static_cast<byte>(copy % 8)); + copy /= 8; } } @@ -47,7 +49,7 @@ void BigInt::encode(byte output[], const BigInt& n, Base base) { divide(copy, 10, copy, remainder); output[output_size - 1 - j] = - Charset::digit2char(remainder.word_at(0)); + Charset::digit2char(static_cast<byte>(remainder.word_at(0))); if(copy.is_zero()) break; } |