Skip to content

Avoid VLA in hash.h#669

Merged
DeckerSU merged 1 commit intodevfrom
patch-fix-novla
Nov 22, 2025
Merged

Avoid VLA in hash.h#669
DeckerSU merged 1 commit intodevfrom
patch-fix-novla

Conversation

@DeckerSU
Copy link
Copy Markdown

This should address that error on Mac Build workflow:

/Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib libcryptoconditions_core.a
  CXX      komodod-bitcoind.o
  CXX      libbitcoin_server_a-addrman.o
  CXX      libbitcoin_server_a-alert.o
  CXX      libbitcoin_server_a-sendalert.o
In file included from addrman.cpp:20:
In file included from ./addrman.h:32:
./hash.h:45:27: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
   45 |         unsigned char buf[sha.OUTPUT_SIZE];
      |                           ^~~~~~~~~~~~~~~
./hash.h:45:27: note: implicit use of 'this' pointer is only allowed within the evaluation of a call to a 'constexpr' member function
./hash.h:69:27: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
   69 |         unsigned char buf[sha.OUTPUT_SIZE];
      |                           ^~~~~~~~~~~~~~~
./hash.h:69:27: note: implicit use of 'this' pointer is only allowed within the evaluation of a call to a 'constexpr' member function
2 errors generated.

@DeckerSU DeckerSU merged commit 6664bba into dev Nov 22, 2025
23 of 24 checks passed
@DeckerSU DeckerSU deleted the patch-fix-novla branch November 22, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant