wintrust/tests: make sure return values are used (LLVM/Clang) (3/4)
Austin English
austinenglish at gmail.com
Fri Feb 4 02:31:26 CST 2011
On Thu, Feb 3, 2011 at 20:19, Juan Lang <juan.lang at gmail.com> wrote:
> Hey Austin,
>
> ok(ret, "WintrustSetRegPolicyFlags failed: %d\n", GetLastError());
> size = sizeof(flags1);
> r = RegQueryValueExA(key, State, NULL, NULL, (LPBYTE)&flags1, &size);
> - ok(flags1 == flags3, "Got %08x flags instead of %08x\n", flags1, flags3);
> + ok(!r || r == ERROR_FILE_NOT_FOUND, "RegQueryValueEx failed: %d\n", r);
> + if (!r)
> + ok(flags1 == flags3, "Got %08x flags instead of %08x\n",
> flags1, flags3);
>
> It seems to me that the introduction of ERROR_FILE_NOT_FOUND weakens
> the test. (Testing r should be done, thanks for fixing that.) I
> assume that, since WintrustSetRegPolicyFlags should have succeeded,
> the registry value should now exist. Is there a test failure you're
> also trying to fix?
No, good catch. Too little caffeine -> copy/paste error. Resending, thanks.
--
-Austin
More information about the wine-devel
mailing list