crypt32/tests: Use lstrlenA instead of strlen in ok() to avoid printf format warnings.
This commit is contained in:
parent
290ddd8e38
commit
93fd4524e4
|
@ -293,7 +293,7 @@ static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header,
|
|||
ret = pCryptStringToBinaryA(str, 0, useFormat, buf, &bufLen,
|
||||
&skipped, &usedFormat);
|
||||
ok(skipped == strlen(garbage),
|
||||
"Expected %d characters skipped, got %ld\n", strlen(garbage),
|
||||
"Expected %d characters skipped, got %ld\n", lstrlenA(garbage),
|
||||
skipped);
|
||||
HeapFree(GetProcessHeap(), 0, buf);
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ static void test_decodeInt(DWORD dwEncoding)
|
|||
CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)buf;
|
||||
|
||||
ok(blob->cbData == strlen((const char*)bigInts[i].decoded),
|
||||
"Expected len %d, got %ld\n", strlen((const char*)bigInts[i].decoded),
|
||||
"Expected len %d, got %ld\n", lstrlenA((const char*)bigInts[i].decoded),
|
||||
blob->cbData);
|
||||
ok(!memcmp(blob->pbData, bigInts[i].decoded, blob->cbData),
|
||||
"Unexpected value\n");
|
||||
|
@ -299,7 +299,7 @@ static void test_decodeInt(DWORD dwEncoding)
|
|||
CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)buf;
|
||||
|
||||
ok(blob->cbData == strlen((const char*)bigUInts[i].val),
|
||||
"Expected len %d, got %ld\n", strlen((const char*)bigUInts[i].val),
|
||||
"Expected len %d, got %ld\n", lstrlenA((const char*)bigUInts[i].val),
|
||||
blob->cbData);
|
||||
ok(!memcmp(blob->pbData, bigUInts[i].val, blob->cbData),
|
||||
"Unexpected value\n");
|
||||
|
|
|
@ -223,7 +223,7 @@ static void test_CertRDNValueToStrA(void)
|
|||
ret = pCertRDNValueToStrA(attrs[i].dwValueType, &attrs[i].Value,
|
||||
buffer, sizeof(buffer));
|
||||
ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %ld\n",
|
||||
strlen(attrs[i].str) + 1, ret);
|
||||
lstrlenA(attrs[i].str) + 1, ret);
|
||||
ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n", attrs[i].str,
|
||||
buffer);
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ static void test_NameToStrConversionA(PCERT_NAME_BLOB pName, DWORD dwStrType,
|
|||
i = pCertNameToStrA(X509_ASN_ENCODING,pName, dwStrType, buffer,
|
||||
sizeof(buffer));
|
||||
ok(i == strlen(expected) + 1, "Expected %d chars, got %ld\n",
|
||||
strlen(expected) + 1, i);
|
||||
lstrlenA(expected) + 1, i);
|
||||
ok(!strcmp(buffer, expected), "Expected %s, got %s\n", expected, buffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue