secur32/tests: Write-strings warnings fix (1 of 2)
Andrew Talbot
Andrew.Talbot at talbotville.com
Sat Aug 5 09:51:13 CDT 2006
Changelog:
secur32/tests: Write-strings warnings fix.
diff -urN a/dlls/secur32/tests/main.c b/dlls/secur32/tests/main.c
--- a/dlls/secur32/tests/main.c 2006-06-16 14:20:12.000000000 +0100
+++ b/dlls/secur32/tests/main.c 2006-08-05 15:14:28.000000000 +0100
@@ -503,18 +503,20 @@
{
SECURITY_STATUS sec_status;
PSecPkgInfo pkg_info;
-
+ static SEC_CHAR ntlm[] = "NTLM",
+ winetest[] = "Winetest";
+
trace("Running testQuerySecurityPackageInfo\n");
-
+
/* Test with an existing package. Test should pass */
pkg_info = (void *)0xdeadbeef;
- sec_status = setupPackageA("NTLM", &pkg_info);
+ sec_status = setupPackageA(ntlm, &pkg_info);
ok((sec_status == SEC_E_OK) || (sec_status == SEC_E_SECPKG_NOT_FOUND),
"Return value of QuerySecurityPackageInfo() shouldn't be %s\n",
getSecError(sec_status) );
-
+
if (sec_status == SEC_E_OK)
{
ok(pkg_info != (void *)0xdeadbeef, "wrong pkg_info address %p\n", pkg_info);
@@ -533,7 +535,7 @@
/* Test with a nonexistent package, test should fail */
pkg_info = (void *)0xdeadbeef;
- sec_status = pQuerySecurityPackageInfoA("Winetest", &pkg_info);
+ sec_status = pQuerySecurityPackageInfoA(winetest, &pkg_info);
ok( sec_status != SEC_E_OK,
"Return value of QuerySecurityPackageInfo() should not be %s for a nonexistent package\n", getSecError(SEC_E_OK));
@@ -541,7 +543,7 @@
ok(pkg_info == (void *)0xdeadbeef, "wrong pkg_info address %p\n", pkg_info);
sec_status = pFreeContextBuffer(pkg_info);
-
+
ok( sec_status == SEC_E_OK,
"Return value of FreeContextBuffer() shouldn't be %s\n",
getSecError(sec_status) );
@@ -678,8 +680,10 @@
testQuerySecurityPackageInfo();
if(pInitSecurityInterfaceA)
{
- testAuth("NTLM", SECURITY_NATIVE_DREP);
- testAuth("NTLM", SECURITY_NETWORK_DREP);
+ static SEC_CHAR sec_pkg_name[] = "NTLM";
+
+ testAuth(sec_pkg_name, SECURITY_NATIVE_DREP);
+ testAuth(sec_pkg_name, SECURITY_NETWORK_DREP);
}
}
}
More information about the wine-patches
mailing list