diff options
author | David Mitchell <davem@iabyn.com> | 2016-03-28 10:52:18 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-03-28 11:04:36 +0100 |
commit | 9d9905599cad5eeb33b2a64c023b97005694fbcd (patch) | |
tree | 319eb231de52a6b72cc87415d10fc95ba5b2c16a /warnings.h | |
parent | 4caf7d8c4666d39b6b752a52ec5e19d9504f5f31 (diff) | |
download | perl-9d9905599cad5eeb33b2a64c023b97005694fbcd.tar.gz |
silence -Wparentheses-equality
Clang has taken it upon itself to warn when an equality is wrapped in
double parentheses, e.g.
((foo == bar))
Which is a bit dumb, as any code along the lines of
#define isBAR (foo == BAR)
if (isBAR) {}
will trigger the warning.
This commit shuts clang up by putting in a harmless cast:
#define isBAR cBOOL(foo == BAR)
Diffstat (limited to 'warnings.h')
-rw-r--r-- | warnings.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/warnings.h b/warnings.h index 4ab2d1d240..337bef374c 100644 --- a/warnings.h +++ b/warnings.h @@ -115,8 +115,8 @@ #define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125" #define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" -#define isLEXWARN_on (PL_curcop->cop_warnings != pWARN_STD) -#define isLEXWARN_off (PL_curcop->cop_warnings == pWARN_STD) +#define isLEXWARN_on cBOOL(PL_curcop->cop_warnings != pWARN_STD) +#define isLEXWARN_off cBOOL(PL_curcop->cop_warnings == pWARN_STD) #define isWARN_ONCE (PL_dowarn & (G_WARN_ON|G_WARN_ONCE)) #define isWARN_on(c,x) (IsSet((U8 *)(c + 1), 2*(x))) #define isWARNf_on(c,x) (IsSet((U8 *)(c + 1), 2*(x)+1)) |