Page MenuHomePhabricator

Remove broken and unused CDataStream methods
ClosedPublic

Authored by PiRK on Thu, Nov 6, 10:38.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC05320e4967a5: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable