Fixing Compiler Error C2466 on MSVC toolset building key.cpp #4810

pull ENikS wants to merge 1 commits into bitcoin:master from ENikS:error_C2466 changing 1 files +1 −1
  1. ENikS commented at 12:02 AM on September 2, 2014: contributor

    Construct char vchZero[0] = {}; is illegal on Microsoft compiler. The constant expression for the array size must be an integer greater than zero. For more info please see: http://msdn.microsoft.com/en-us/library/6zxfydcs.aspx

    Adding one element seams to be quick and safe fix.

  2. Fixing Compiler Error C2466 c0f5d4aba5
  3. sipa commented at 12:05 AM on September 2, 2014: member

    untested ACK

  4. gavinandresen commented at 12:13 AM on September 2, 2014: contributor

    Code-review ACK.

  5. gavinandresen commented at 12:14 AM on September 2, 2014: contributor

    PS: unrelated to this pull, but there is dead code in script.cpp: ./script.cpp:static const valtype vchZero(0);

  6. BitcoinPullTester commented at 12:17 AM on September 2, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4810_c0f5d4aba5e158d32edb3fc280f63e04542e90d4/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  7. laanwj commented at 7:34 AM on September 2, 2014: member

    Maybe the most elegant would be to make it 32 bytes, like everything else that has to do with keys. CompareBigEndian can be shorter if it can always assume c1len==c2len==32.

    Anyhow, ACK on this solution, it's safe and gets it to compile.

  8. TheBlueMatt commented at 7:52 AM on September 2, 2014: member

    ut ACK.

  9. jgarzik commented at 7:58 AM on September 2, 2014: contributor

    ut ACK

  10. laanwj merged this on Sep 2, 2014
  11. laanwj closed this on Sep 2, 2014

  12. laanwj referenced this in commit 6ce927cf10 on Sep 2, 2014
  13. ENikS deleted the branch on Sep 2, 2014
  14. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me