diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2021-08-08 18:38:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-09 09:01:30 -0700 |
commit | 14825944d7c57b6acd7e1a05a4c6046965efc6a5 (patch) | |
tree | 2f2bc32f1bbc37aea6ebf24d9cf8fca9ce9c2848 /t/t4013/diff.show_-m_master | |
parent | oidtree: a crit-bit tree for odb_loose_cache (diff) | |
download | tgif-14825944d7c57b6acd7e1a05a4c6046965efc6a5.tar.xz |
oidtree: avoid nested struct oidtree_node
92d8ed8ac1 (oidtree: a crit-bit tree for odb_loose_cache, 2021-07-07)
adds a struct oidtree_node that contains only an n field with a
struct cb_node.
unfortunately, while building in pedantic mode witch clang 12 (as well
as a similar error from gcc 11) it will show:
oidtree.c:11:17: error: 'n' may not be nested in a struct due to flexible array member [-Werror,-Wflexible-array-extensions]
struct cb_node n;
^
because of a constrain coded in ISO C 11 6.7.2.1¶3 that forbids using
structs that contain a flexible array as part of another struct.
use a strict cb_node directly instead.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.show_-m_master')
0 files changed, 0 insertions, 0 deletions