pglobal: Avoid ambiguous else
Addresses this warning: [ 68%] Building C object CMakeFiles/pglobal.dir/pglobal.c.o /home/acme/git/pahole/pglobal.c: In function ‘extvar__add’: /home/acme/git/pahole/pglobal.c:92:11: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else] else if (*nodep != gvar) ^ cc1: all warnings being treated as errors Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
77d06c2d30
commit
608813d0af
|
@ -89,7 +89,7 @@ static void extvar__add(const struct variable *var, const struct cu *cu)
|
|||
nodep = tsearch(gvar, &tree, extvar__compare);
|
||||
if (nodep == NULL)
|
||||
oom("tsearch");
|
||||
else if (*nodep != gvar)
|
||||
else if (*nodep != gvar) {
|
||||
if (gvar->var->declaration) {
|
||||
gvar->next = (*nodep)->next;
|
||||
(*nodep)->next = gvar;
|
||||
|
@ -97,6 +97,7 @@ static void extvar__add(const struct variable *var, const struct cu *cu)
|
|||
gvar->next = *nodep;
|
||||
*nodep = gvar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue