crypt32/tests: Fix signed integral cast warning.

First cast to int, then to DWORD.

Reported by MinGW GCC 10 with -Woverflow.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2020-06-03 11:50:32 +02:00 committed by Alexandre Julliard
parent b33e1d4cb7
commit 4e94e21060
1 changed files with 3 additions and 3 deletions

View File

@ -2909,7 +2909,7 @@ static void testGetValidUsages(void)
ret = pCertGetValidUsages(0, NULL, NULL, NULL, &size);
*/
contexts[0] = NULL;
numOIDs = size = 0xdeadbeef;
size = numOIDs = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = pCertGetValidUsages(1, &contexts[0], &numOIDs, NULL, &size);
ok(ret, "CertGetValidUsages failed: %d\n", GetLastError());
@ -2921,12 +2921,12 @@ static void testGetValidUsages(void)
sizeof(certWithUsage));
contexts[2] = CertCreateCertificateContext(X509_ASN_ENCODING,
cert2WithUsage, sizeof(cert2WithUsage));
numOIDs = size = 0xdeadbeef;
size = numOIDs = 0xdeadbeef;
ret = pCertGetValidUsages(0, NULL, &numOIDs, NULL, &size);
ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError());
ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs);
ok(size == 0, "Expected size 0, got %d\n", size);
numOIDs = size = 0xdeadbeef;
size = numOIDs = 0xdeadbeef;
ret = pCertGetValidUsages(1, contexts, &numOIDs, NULL, &size);
ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError());
ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs);