comdlg32: Avoid a compiler warning with newer clang or GCC.
Gerald Pfeifer
gerald at pfeifer.com
Sun Jun 22 14:43:06 CDT 2014
Newer compilers can warn when there is a logic not on the left
side of a comparison. Putting parentheses around that expression
is the documented way noting the code is as desired.
Gerald
---
dlls/comdlg32/tests/finddlg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comdlg32/tests/finddlg.c b/dlls/comdlg32/tests/finddlg.c
index be98308..79fc67d 100644
--- a/dlls/comdlg32/tests/finddlg.c
+++ b/dlls/comdlg32/tests/finddlg.c
@@ -54,7 +54,7 @@ static void test_param_check(void)
#define CHECK_FIND_OR_REPLACE(FUNC, FAIL, ERR_CODE) \
do { \
HWND hwnd = FUNC(pFr); \
- BOOL is_ok = !!hwnd == !FAIL; \
+ BOOL is_ok = (!!hwnd) == !FAIL; \
ok(is_ok, "%s should%s fail\n", #FUNC, FAIL ? "" : "n't"); \
if (FAIL && is_ok) { \
DWORD ext_err = CommDlgExtendedError(); \
--
1.9.3
More information about the wine-patches
mailing list