Alexandre Julliard : crypt32/tests: Use lstrlenA instead of strlen in ok() to avoid printf format warnings.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 14 06:49:52 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 93fd4524e4aae9c76927a76c580e9921400774ec
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=93fd4524e4aae9c76927a76c580e9921400774ec

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 13 13:56:39 2006 +0200

crypt32/tests: Use lstrlenA instead of strlen in ok() to avoid printf format warnings.

---

 dlls/crypt32/tests/base64.c |    2 +-
 dlls/crypt32/tests/encode.c |    4 ++--
 dlls/crypt32/tests/str.c    |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c
index 998ea60..d6ebf20 100644
--- a/dlls/crypt32/tests/base64.c
+++ b/dlls/crypt32/tests/base64.c
@@ -293,7 +293,7 @@ static void decodeAndCompareBase64_A(LPC
                 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);
             }
diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c
index da5b975..ac6f18c 100644
--- a/dlls/crypt32/tests/encode.c
+++ b/dlls/crypt32/tests/encode.c
@@ -272,7 +272,7 @@ static void test_decodeInt(DWORD dwEncod
             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 dwEncod
             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");
diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c
index 9e5da9b..c7c2e97 100644
--- a/dlls/crypt32/tests/str.c
+++ b/dlls/crypt32/tests/str.c
@@ -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(PC
     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);
 }
 




More information about the wine-cvs mailing list