prefcnt: Avoid ambiguous else with for_each macro
Addresses: [ 80%] Building C object CMakeFiles/prefcnt.dir/prefcnt.c.o /home/acme/git/pahole/prefcnt.c: In function ‘refcnt_tag’: /home/acme/git/pahole/prefcnt.c:67:5: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else] if (tag__is_struct(tag) || tag__is_union(tag)) ^ cc1: all warnings being treated as errors Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
608813d0af
commit
0f52b11f91
|
@ -64,9 +64,10 @@ static void refcnt_tag(struct tag *tag, const struct cu *cu)
|
||||||
|
|
||||||
tag->visited = 1;
|
tag->visited = 1;
|
||||||
|
|
||||||
if (tag__is_struct(tag) || tag__is_union(tag))
|
if (tag__is_struct(tag) || tag__is_union(tag)) {
|
||||||
type__for_each_member(tag__type(tag), member)
|
type__for_each_member(tag__type(tag), member)
|
||||||
refcnt_member(member, cu);
|
refcnt_member(member, cu);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void refcnt_lexblock(const struct lexblock *lexblock, const struct cu *cu)
|
static void refcnt_lexblock(const struct lexblock *lexblock, const struct cu *cu)
|
||||||
|
|
Loading…
Reference in New Issue