Commit 621a04a
committed
Merge #120: proxy-types.h: add static_assert to detect int/enum size mismatch
110349f test: Add coverage for enum/int conversions (Ryan Ofsky)
bbc80ab proxy-types.h: add static_assert to detect when an int fields is too small to hold an enum value (Ryan Ofsky)
Pull request description:
Add static_assert to detect when an int field is too small to hold an enum value
This catches the bug TheCharlatan pointed out in bitcoin/bitcoin#29409 (comment)
Top commit has no ACKs.
Tree-SHA512: cc0adc905e6a6fbd89dd970e5b6675279a514c4e47579b2ef6617c76f0cb18a50dc56539dac300dd89939d5b65cae2e1967c5fae2926b25fe0d36609e86ecb863 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
963 | 963 | | |
964 | 964 | | |
965 | 965 | | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
966 | 969 | | |
967 | 970 | | |
968 | 971 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
0 commit comments