diff options
author | lloyd <[email protected]> | 2011-02-09 15:38:50 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-02-09 15:38:50 +0000 |
commit | e92f422c555cd8be39de440e4a52897affb28b95 (patch) | |
tree | 68a7288d94564134ac9d52dd1d8b9e268a1ebebc | |
parent | 5aafb813ed7b3824bc71b2aea22f4268f06ca75e (diff) |
More VC warning fixes
-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; } |