fuzz: Avoid designated initialization (C++20) in fuzz tests#21037
Merged
maflcko merged 1 commit intobitcoin:masterfrom Jan 31, 2021
Merged
fuzz: Avoid designated initialization (C++20) in fuzz tests#21037maflcko merged 1 commit intobitcoin:masterfrom
maflcko merged 1 commit intobitcoin:masterfrom
Conversation
Member
|
cr ACK dee2d6f |
Contributor
|
code review ACK dee2d6f |
Contributor
|
utACK dee2d6f If you wanted to preserve the constness, could do something like the designated initializers via: #define DES_INIT_VIA_x(TYP, CODE) (([&]() { TYP x; {CODE} return x; })())
const in_addr v4_addr = DES_INIT_VIA_x(in_addr,
x.s_addr = fuzzed_data_provider.ConsumeIntegral<uint32_t>();
); |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Feb 2, 2021
… fuzz tests dee2d6f fuzz: Avoid designated initialization (C++20) in fuzz tests (practicalswift) Pull request description: Avoid designated initialization (C++20) in fuzz tests. Context: bitcoin#20197 (comment), bitcoin#20936 (comment) ACKs for top commit: MarcoFalke: cr ACK dee2d6f dhruv: code review ACK dee2d6f ajtowns: utACK dee2d6f Tree-SHA512: 5940fab6e97a2b11dd3b1475d2cffa2840dc2e6ec34bd9f9df90f948709cab98fd1c513d5dd104816d33a525a6e9710b8715b02db941e35d84f92bc211f56d1d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoid designated initialization (C++20) in fuzz tests.
Context: #20197 (comment), #20936 (comment)