HomePhabricator

Remove broken and unused CDataStream methods

Description

Remove broken and unused CDataStream methods

Summary:
Backport of core#24253
Depends on D18891

The second commit fixes a new warning I've been seeing since we bumped the codebase to c++20:

In file included from /usr/include/string.h:548,
                 from /usr/include/c++/13/cstring:42,
                 from /home/pierre/dev/bitcoin-abc/src/./crypto/common.h:13,
                 from /home/pierre/dev/bitcoin-abc/src/./random.h:10,
                 from /home/pierre/dev/bitcoin-abc/src/test/streams_tests.cpp:5:
In function ‘void* memcpy(void*, const void*, size_t)’,
    inlined from ‘void CDataStream::insert(iterator, std::vector<std::byte>::const_iterator, std::vector<std::byte>::const_iterator)’ at /home/pierre/dev/bitcoin-abc/src/./streams.h:257:19,
    inlined from ‘void streams_tests::streams_serializedata_xor::test_method()’ at /home/pierre/dev/bitcoin-abc/src/test/streams_tests.cpp:195:14:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ forming offset [2, 4294967295] is out of the bounds [0, 2] [-Warray-bounds=]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18892

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Feb 3 2022, 18:45
PiRKCommitted on Thu, Nov 6, 11:56
PiRKPushed on Thu, Nov 6, 11:56
Reviewer
Restricted Project
Differential Revision
D18892: Remove broken and unused CDataStream methods
Parents
rABC2c24045ddb98: test: Fix sanitizer suppresions in streams_tests
Branches
Unknown
Tags
Unknown