Commit 4e94e210 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

crypt32/tests: Fix signed integral cast warning.

First cast to int, then to DWORD. Reported by MinGW GCC 10 with -Woverflow. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b33e1d4c
...@@ -2909,7 +2909,7 @@ static void testGetValidUsages(void) ...@@ -2909,7 +2909,7 @@ static void testGetValidUsages(void)
ret = pCertGetValidUsages(0, NULL, NULL, NULL, &size); ret = pCertGetValidUsages(0, NULL, NULL, NULL, &size);
*/ */
contexts[0] = NULL; contexts[0] = NULL;
numOIDs = size = 0xdeadbeef; size = numOIDs = 0xdeadbeef;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pCertGetValidUsages(1, &contexts[0], &numOIDs, NULL, &size); ret = pCertGetValidUsages(1, &contexts[0], &numOIDs, NULL, &size);
ok(ret, "CertGetValidUsages failed: %d\n", GetLastError()); ok(ret, "CertGetValidUsages failed: %d\n", GetLastError());
...@@ -2921,12 +2921,12 @@ static void testGetValidUsages(void) ...@@ -2921,12 +2921,12 @@ static void testGetValidUsages(void)
sizeof(certWithUsage)); sizeof(certWithUsage));
contexts[2] = CertCreateCertificateContext(X509_ASN_ENCODING, contexts[2] = CertCreateCertificateContext(X509_ASN_ENCODING,
cert2WithUsage, sizeof(cert2WithUsage)); cert2WithUsage, sizeof(cert2WithUsage));
numOIDs = size = 0xdeadbeef; size = numOIDs = 0xdeadbeef;
ret = pCertGetValidUsages(0, NULL, &numOIDs, NULL, &size); ret = pCertGetValidUsages(0, NULL, &numOIDs, NULL, &size);
ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError());
ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs);
ok(size == 0, "Expected size 0, got %d\n", size); ok(size == 0, "Expected size 0, got %d\n", size);
numOIDs = size = 0xdeadbeef; size = numOIDs = 0xdeadbeef;
ret = pCertGetValidUsages(1, contexts, &numOIDs, NULL, &size); ret = pCertGetValidUsages(1, contexts, &numOIDs, NULL, &size);
ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError());
ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment