From 5085d263f2f084778b1314fc5e808668c3758d82 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 15 Sep 2014 16:05:30 +0200 Subject: Fix warning: equality comparison with extraneous parentheses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Example of warning: src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if (((wbc_status) == WBC_ERR_SUCCESS)) { ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23: note: remove extraneous parentheses around the comparison to silence this warning if (((wbc_status) == WBC_ERR_SUCCESS)) { ~ ^ ~ src/sss_client/libwbclient/wbc_pwd_sssd.c:246:23: note: use '=' to turn this equality comparison into an assignment if (((wbc_status) == WBC_ERR_SUCCESS)) { ^~ = The reason is definition of some macros which were used in if conditions. Reviewed-by: Michal Židek --- src/python/pyhbac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/python') diff --git a/src/python/pyhbac.c b/src/python/pyhbac.c index c46f7c6b3..f3aaa60f0 100644 --- a/src/python/pyhbac.c +++ b/src/python/pyhbac.c @@ -794,7 +794,7 @@ hbac_rule_set_enabled(HbacRuleObject *self, PyObject *enabled, void *closure) Py_DECREF(utf8_str); return 0; - } else if (PyBool_Check(enabled)) { + } else if (PyBool_Check(enabled) == true) { self->enabled = (enabled == Py_True); return 0; } else if (PYNUMBER_CHECK(enabled)) { -- cgit