Files
bitcoin/src
Pieter Wuille 565494619d Merge #10735: Avoid static analyzer warnings regarding uninitialized arguments
6835cb0ab Avoid static analyzer warnings regarding uninitialized arguments (practicalswift)

Pull request description:

  Avoid static analyzer warnings regarding _"Function call argument is a pointer to uninitialized value"_ in cases where we are intentionally using such arguments.

  This is achieved by using `f(b.begin(), b.end())` (`std::array<char, N>`) instead of `f(b, b + N)` (`char b[N]`).

  Rationale:
  * Reduce false positives by guiding static analyzers regarding our intentions.

  Before this commit:

  ```shell
  $ clang-tidy-3.5 -checks=* src/bench/base58.cpp
  bench/base58.cpp:23:9: warning: Function call argument is a pointer to uninitialized value [clang-analyzer-core.CallAndMessage]
          EncodeBase58(b, b + 32);
          ^
  $ clang-tidy-3.5 -checks=* src/bench/verify_script.cpp
  bench/verify_script.cpp:59:5: warning: Function call argument is a pointer to uninitialized value [clang-analyzer-core.CallAndMessage]
      key.Set(vchKey, vchKey + 32, false);
      ^
  $
  ```

  After this commit:

  ```shell
  $ clang-tidy-3.5 -checks=* src/bench/base58.cpp
  $ clang-tidy-3.5 -checks=* src/bench/verify_script.cpp
  $
  ```

Tree-SHA512: 5814a320ca8b959d0954bb64393424bcad73f942d2e988de1cd6788f39153b93900325532f2e340de02d740a3953385d212ae08e7ec72bb4c394a40475f251df
2017-07-16 12:15:11 -07:00
..
2017-07-15 14:28:40 +02:00
2017-06-05 00:52:36 +02:00
2017-06-22 19:18:10 +03:00
2017-07-15 14:28:40 +02:00
2017-06-22 19:18:10 +03:00
2017-07-16 17:03:33 +02:00
2017-07-08 13:33:01 -07:00
2017-07-08 13:33:01 -07:00
2017-07-16 02:25:25 +02:00
2017-06-09 10:25:26 +02:00
2017-07-15 14:28:40 +02:00
2017-02-13 14:39:48 +09:00
2017-06-09 10:25:26 +02:00
2017-06-22 19:18:10 +03:00
2017-06-09 10:25:26 +02:00
2017-06-05 16:33:35 -04:00
2017-07-14 12:17:33 -07:00
2017-06-22 19:18:10 +03:00
2017-07-08 13:33:01 -07:00
2017-07-08 13:33:01 -07:00
2017-06-09 10:25:26 +02:00
2017-07-08 13:33:01 -07:00
2017-07-07 10:45:31 -07:00
2017-07-14 19:24:17 +00:00