clang dangling else help
Anton Shterenlikht
mexas at bristol.ac.uk
Thu Sep 27 15:22:13 UTC 2012
From: Dimitry Andric <dimitry at andric.com>
On 2012-09-27 14:16, Anton Shterenlikht wrote:
> Building my port with clang I get this warning
> (gcc doesn't pick this up):
>
> x11.c:1543:5: warning: add explicit braces to avoid dangling else [-Wdangling-else]
> else if (actual_type != None)
> ^
> 1 warning generated.
If the warning isn't fatal (e.g. you are not using -Werror), and you
know the code is right, you could just ignore the warning. Or are you
trying to make it warning-free?
Yes, would be good to have no warnings.
Anyway, this particular one is really worth fixing.
Thanks for the clarification.
Anton
More information about the freebsd-ports
mailing list