Skip to content

Conversation

practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Sep 5, 2018

Fix remaining compiler warnings (MSVC).

Before:

$ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
…\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
…\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
…\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
…\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
…\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
…\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
…\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
$

After:

$ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
$

@practicalswift practicalswift changed the title Fix remaining compiler warnings (MSVC) windows: Fix remaining compiler warnings (MSVC) Sep 5, 2018
@practicalswift practicalswift force-pushed the fix-remaining-compiler-warnings-msvc branch 3 times, most recently from 383b749 to 699d458 Compare September 5, 2018 13:53
@practicalswift practicalswift force-pushed the fix-remaining-compiler-warnings-msvc branch from 699d458 to e99684c Compare September 6, 2018 12:50
@sipsorcery
Copy link
Contributor

tACK e99684c

Prior to this PR:

msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
c:\projects\bitcoin-72c17\src\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch [C:\projects\bitcoin-72c17\build_msvc\libbitcoinconsensus\libbitcoinconsensus.vcxproj]
c:\projects\bitcoin-72c17\src\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size [C:\projects\bitcoin-72c17\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
c:\tools\vcpkg\installed\x64-windows-static\include\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation [C:\projects\bitcoin-72c17\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
c:\projects\bitcoin-72c17\src\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) [C:\projects\bitcoin-72c17\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
c:\projects\bitcoin-72c17\src\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation [C:\projects\bitcoin-72c17\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
c:\projects\bitcoin-72c17\src\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation [C:\projects\bitcoin-72c17\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
c:\projects\bitcoin-72c17\src\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation [C:\projects\bitcoin-72c17\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
move build_msvc\%PLATFORM%\%CONFIGURATION%\*.iobj build_msvc\cache\

Subsequently:

msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
move build_msvc\%PLATFORM%\%CONFIGURATION%\*.iobj build_msvc\cache\

@practicalswift practicalswift force-pushed the fix-remaining-compiler-warnings-msvc branch from abf1b0e to 94ce7c9 Compare September 9, 2018 19:34
@practicalswift
Copy link
Contributor Author

practicalswift commented Sep 9, 2018

@sipsorcery @MarcoFalke Please re-review :-)

@practicalswift
Copy link
Contributor Author

@ken2812221 Squashed. Please re-review :-)

@practicalswift practicalswift force-pushed the fix-remaining-compiler-warnings-msvc branch from 94ce7c9 to 224cc41 Compare September 10, 2018 05:27
@practicalswift practicalswift force-pushed the fix-remaining-compiler-warnings-msvc branch 3 times, most recently from 4094687 to 224cc41 Compare September 10, 2018 12:51
@NicolasDorier
Copy link
Contributor

Adding /warnaserror is a bit too much?

@NicolasDorier
Copy link
Contributor

For test, I tried running a dry compile with /warnaserror, it worked fine but two warning show up. (If I recompile a second time, without cleaning, it does not show)

"C:\Sources\bitcoin\build_msvc\bitcoin.sln" (default target) (1) ->
"C:\Sources\bitcoin\build_msvc\libbitcoinconsensus\libbitcoinconsensus.vcxproj" (default target) (2) ->
(ClCompile target) ->
  c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.14.26428\include\xutility(3182): error C4996: 'std::equal::_Unchecked_iterators::_Deprecate': Call to 'st
d::equal' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See docu
mentation on how to use Visual C++ 'Checked Iterators' [C:\Sources\bitcoin\build_msvc\libbitcoinconsensus\libbitcoinconsensus.vcxproj]


"C:\Sources\bitcoin\build_msvc\bitcoin.sln" (default target) (1) ->
"C:\Sources\bitcoin\build_msvc\testconsensus\testconsensus.vcxproj" (default target) (3) ->
"C:\Sources\bitcoin\build_msvc\libbitcoin_util\libbitcoin_util.vcxproj" (default target) (4) ->
(Lib target) ->
  sync.obj : error LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\Sources\b
itcoin\build_msvc\libbitcoin_util\libbitcoin_util.vcxproj]

That said, I don't think this is very important,

tACK 224cc41bb9fd2906d9a61abd0cad9bd77365569b

@practicalswift
Copy link
Contributor Author

@NicolasDorier Personally I'm all for /warnaserror assuming AppVeyor build failures don't block merge (and thus get in the way of the maintainers job). They don't right?

@NicolasDorier
Copy link
Contributor

The whole purpose of /warnaserror is to break the build. I tried /warnaserror, and there is the above error for the first build. I don't think it is worth fixing/fixable.

@practicalswift
Copy link
Contributor Author

@NicolasDorier Yes, I know but I thought the project was configured to block merge in case of Travis build failure but not in case of AppVeyor build failure. But I'm probably mistaken :-)

@NicolasDorier
Copy link
Contributor

NicolasDorier commented Sep 10, 2018

ah yes I think you are right. Well, I think we can ignore /warnaserror for now, except if you find an obvious fix, even if it does not break, I feel uneasy with red failure. :p

@sipsorcery
Copy link
Contributor

For a C++ build to exclude specific warnings and set the "treat warnings as error" flag the following node can be added to the common.vcxproj file:

<Project>
  <ItemDefinitionGroup>
	<ClCompile>
	  <DisableSpecificWarnings>4244;4267;4715;4805;</DisableSpecificWarnings>
	  <TreatWarningAsError>true</TreatWarningAsError>
	</ClCompile>
  </ItemDefinitionGroup>
</Project>

When warnings as error is set the script\interpreter.cpp code fails to compile on line 264 and specifically this check:

std::equal(b.begin(), b.end(), pc)

A quick Google found a blog post about Visual C++ range checking safety. To ignore this warning add 4996 to the list of specific warnings and the solution will then compile.

@sipsorcery
Copy link
Contributor

tACK f14f4a6.

@NicolasDorier
Copy link
Contributor

re-utACK for me

@sipsorcery
Copy link
Contributor

tACK bc7aff7 & 1423334.

@ken2812221
Copy link
Contributor

ACK bc7aff7

@Empact
Copy link
Contributor

Empact commented Jan 13, 2019

re-utACK bc7aff7

@practicalswift
Copy link
Contributor Author

@laanwj Added a commit. Please re-review :-)

@laanwj
Copy link
Member

laanwj commented Jan 15, 2019

LGTM, please squash before merge though!
(and please, don't tag me in commit messages, this gets me lots of mails)

@practicalswift practicalswift force-pushed the fix-remaining-compiler-warnings-msvc branch from 514da96 to ed7e26b Compare January 15, 2019 19:13
@practicalswift
Copy link
Contributor Author

@laanwj Fixed! Sorry for the tag. Please re-review :-)

@NicolasDorier @sipsorcery @ken2812221 @Empact Would you mind re-reviewing?

@practicalswift practicalswift force-pushed the fix-remaining-compiler-warnings-msvc branch from ed7e26b to b9dafe7 Compare January 15, 2019 19:15
@sipsorcery
Copy link
Contributor

re-utACK b9dafe7.

Personally I would use an integer-suffix instead of the static cast, e.g. 0x0x08000000ul but it's purely a style thing and of no consequence here.

@practicalswift
Copy link
Contributor Author

practicalswift commented Jan 15, 2019

@sipsorcery I don't think there exists an integer-suffix in C++11 guaranteeing a width of exactly 64 bits on all supported platforms? :-)

@sipsorcery
Copy link
Contributor

I don't think there exists an integer-suffix in C++11 guaranteeing a width of exactly 64 bits on all supported platforms? :-)

The C++17 specification states that ul can be represented by unsigned long or unsigned long long so no there is no guarantee of exactly 64 bits. It also indicates that uint64_t, uint32_t etc. are optional.

I've no argument either way.

@laanwj
Copy link
Member

laanwj commented Jan 16, 2019

Personally I would use an integer-suffix instead of the static cast, e.g. 0x0x08000000ul but it's purely a style thing and of no consequence here.

@sipsorcery I don't think there exists an integer-suffix in C++11 guaranteeing a width of exactly 64 bits on all supported platforms? :-)

Yeah, indeed, if only C++ had Rust's u64 suffix it would be easy!

@laanwj
Copy link
Member

laanwj commented Jan 16, 2019

utACK b9dafe7

@laanwj laanwj merged commit b9dafe7 into bitcoin:master Jan 16, 2019
laanwj added a commit that referenced this pull request Jan 16, 2019
b9dafe7 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115
maflcko pushed a commit that referenced this pull request Jul 2, 2020
…se of uninitialized memory

870f0cd build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory (practicalswift)

Pull request description:

  Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory.

  First UBSan, then ASan followed by TSan... and now: yes, the wait is over -- **MSan is finally here!** :)

  Some historical context:
  * 2017: Continuous compilation with Clang Thread Safety analysis enabled (#10866, #10923)
  * 2018: Continuous testing with trapping on signed integer overflows (`-ftrapv`) (#12686)
  * 2018: Continuous testing of use of locale dependent functions (#13041)
  * 2018: Continuous testing of format strings (#13705)
  * 2018: Continuous compilation with MSVC `TreatWarningAsError` (#14151)
  * 2018: Continuous testing under UndefinedBehaviorSanitizer – UBSan (#14252, #14673, #17006)
  * 2018: Continuous testing under AddressSanitizer – ASan (#14794, #17205, #17674)
  * 2018: Continuous testing under ThreadSanitizer – TSan (#14829)
  * 2019: Continuous testing in an unsigned char environment (`-funsigned-char`) (#15134)
  * 2019: Continuous compile-time testing of assumptions we're making (#15391)
  * 2019: Continuous testing of fuzz test cases under Valgrind (#17633, #18159, #18166)
  * 2020: Finally... MemorySanitizer – MSAN! :)

  What is the next step? What tools should we add to CI to keep bugs from entering `master`? :)

ACKs for top commit:
  MarcoFalke:
    ACK 870f0cd

Tree-SHA512: 38327c8b75679d97d469fe42e704cacd1217447a5a603701dd8a58ee50b3be2c10248f8d68a479ed081c0c4b254589d3081c9183f991640b06ef689061f75578
@practicalswift practicalswift deleted the fix-remaining-compiler-warnings-msvc branch April 10, 2021 19:37
linuxsh2 pushed a commit to linuxsh2/dash that referenced this pull request Sep 16, 2021
b9dafe7 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Oct 3, 2021
b9dafe7 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115

# Conflicts:
#	.appveyor.yml
#	build_msvc/common.vcxproj
#	src/test/script_tests.cpp
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Oct 4, 2021
…etect use of uninitialized memory

870f0cd build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory (practicalswift)

Pull request description:

  Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory.

  First UBSan, then ASan followed by TSan... and now: yes, the wait is over -- **MSan is finally here!** :)

  Some historical context:
  * 2017: Continuous compilation with Clang Thread Safety analysis enabled (bitcoin#10866, bitcoin#10923)
  * 2018: Continuous testing with trapping on signed integer overflows (`-ftrapv`) (bitcoin#12686)
  * 2018: Continuous testing of use of locale dependent functions (bitcoin#13041)
  * 2018: Continuous testing of format strings (bitcoin#13705)
  * 2018: Continuous compilation with MSVC `TreatWarningAsError` (bitcoin#14151)
  * 2018: Continuous testing under UndefinedBehaviorSanitizer – UBSan (bitcoin#14252, bitcoin#14673, bitcoin#17006)
  * 2018: Continuous testing under AddressSanitizer – ASan (bitcoin#14794, bitcoin#17205, bitcoin#17674)
  * 2018: Continuous testing under ThreadSanitizer – TSan (bitcoin#14829)
  * 2019: Continuous testing in an unsigned char environment (`-funsigned-char`) (bitcoin#15134)
  * 2019: Continuous compile-time testing of assumptions we're making (bitcoin#15391)
  * 2019: Continuous testing of fuzz test cases under Valgrind (bitcoin#17633, bitcoin#18159, bitcoin#18166)
  * 2020: Finally... MemorySanitizer – MSAN! :)

  What is the next step? What tools should we add to CI to keep bugs from entering `master`? :)

ACKs for top commit:
  MarcoFalke:
    ACK 870f0cd

Tree-SHA512: 38327c8b75679d97d469fe42e704cacd1217447a5a603701dd8a58ee50b3be2c10248f8d68a479ed081c0c4b254589d3081c9183f991640b06ef689061f75578
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Oct 5, 2021
b9dafe7 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115

# Conflicts:
#	.appveyor.yml
#	build_msvc/common.vcxproj
#	src/test/script_tests.cpp
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Oct 7, 2021
b9dafe7 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115

# Conflicts:
#	.appveyor.yml
#	build_msvc/common.vcxproj
#	src/test/script_tests.cpp
pravblockc pushed a commit to pravblockc/dash that referenced this pull request Nov 18, 2021
b9dafe7 Fix remaining compiler warnings (MSVC). Move disabling of specific warnings from /nowarn to project file. (practicalswift)

Pull request description:

  Fix remaining compiler warnings (MSVC).

  Before:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715 /nologo
  …\script\script.cpp(272): warning C4018: '>': signed/unsigned mismatch
  …\test\allocator_tests.cpp(147): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size
  …\boost\test\tools\old\impl.hpp(107): warning C4805: '==': unsafe mix of type 'const Left' and type 'const Right' in operation
  …\test\crypto_tests.cpp(535): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
  …\test\script_tests.cpp(188): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(190): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  …\test\script_tests.cpp(191): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
  $
  ```

  After:

  ```
  $ msbuild /p:TrackFileAccess=false /p:CLToolExe=clcache.exe build_msvc\bitcoin.sln /m /v:q /nowarn:C4244;C4267;C4715;C4805 /nologo
  $
  ```

Tree-SHA512: 5b30334d3804e869779e77dad75a799e8e5e7eb2e08634cd40035cce140edd623cbb6c8b5806d2158c3df97888d3ea9ff4b8b6a5a83de3fe2cb361e29588c115

# Conflicts:
#	.appveyor.yml
#	build_msvc/common.vcxproj
#	src/test/script_tests.cpp
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.