msi/tests: Remove superfluous pointer casts.

Michael Stefaniuc mstefani at redhat.de
Thu Jan 15 02:44:57 CST 2009


---
 dlls/msi/tests/automation.c |    4 ++--
 dlls/msi/tests/install.c    |    2 +-
 dlls/msi/tests/msi.c        |    6 +++---
 dlls/msi/tests/package.c    |    4 ++--
 dlls/msi/tests/source.c     |    4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 1c392cb..f831ef4 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -594,7 +594,7 @@ static void test_dispatch(void)
     ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr);
 
     /* Test getting ID of a function name that does exist */
-    name = (WCHAR *)szOpenPackage;
+    name = szOpenPackage;
     hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
     ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr);
 
@@ -638,7 +638,7 @@ static void test_dispatch(void)
     ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr);
 
     /* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */
-    name = (WCHAR *)szProductState;
+    name = szProductState;
     hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid);
     ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr);
 
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index dd5dc29..5360284 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -1362,7 +1362,7 @@ static void get_user_sid(LPSTR *usersid)
 
     OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
     size = sizeof(buf);
-    GetTokenInformation(token, TokenUser, (void *)buf, size, &size);
+    GetTokenInformation(token, TokenUser, buf, size, &size);
     user = (PTOKEN_USER)buf;
     pConvertSidToStringSidA(user->User.Sid, usersid);
 }
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index a52e011..fba584d 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -505,7 +505,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed)
     hr = CoCreateGuid(&guid);
     ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
-    size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH);
+    size = StringFromGUID2(&guid, guidW, MAX_PATH);
     ok(size == 39, "Expected 39, got %d\n", hr);
 
     WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL);
@@ -522,7 +522,7 @@ static void get_user_sid(LPSTR *usersid)
 
     OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
     size = sizeof(buf);
-    GetTokenInformation(token, TokenUser, (void *)buf, size, &size);
+    GetTokenInformation(token, TokenUser, buf, size, &size);
     user = (PTOKEN_USER)buf;
     pConvertSidToStringSidA(user->User.Sid, usersid);
 }
@@ -794,7 +794,7 @@ static void compose_base85_guid(LPSTR component, LPSTR comp_base85, LPSTR squash
     hr = CoCreateGuid(&guid);
     ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
-    size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH);
+    size = StringFromGUID2(&guid, guidW, MAX_PATH);
     ok(size == 39, "Expected 39, got %d\n", hr);
 
     WideCharToMultiByte(CP_ACP, 0, guidW, size, component, MAX_PATH, NULL, NULL);
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index aa0b6f3..66ff3f0 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -48,7 +48,7 @@ static void get_user_sid(LPSTR *usersid)
 
     OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
     size = sizeof(buf);
-    GetTokenInformation(token, TokenUser, (void *)buf, size, &size);
+    GetTokenInformation(token, TokenUser, buf, size, &size);
     user = (PTOKEN_USER)buf;
     pConvertSidToStringSidA(user->User.Sid, usersid);
 }
@@ -160,7 +160,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed)
     hr = CoCreateGuid(&guid);
     ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
-    size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH);
+    size = StringFromGUID2(&guid, guidW, MAX_PATH);
     ok(size == 39, "Expected 39, got %d\n", hr);
 
     WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL);
diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c
index 9248b70..2eb5f18 100644
--- a/dlls/msi/tests/source.c
+++ b/dlls/msi/tests/source.c
@@ -114,7 +114,7 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed)
     hr = CoCreateGuid(&guid);
     ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
 
-    size = StringFromGUID2(&guid, (LPOLESTR)guidW, MAX_PATH);
+    size = StringFromGUID2(&guid, guidW, MAX_PATH);
     ok(size == 39, "Expected 39, got %d\n", hr);
 
     WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL);
@@ -136,7 +136,7 @@ static int get_user_sid(LPSTR *usersid)
     if (!rc && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
         return 0;
     size = sizeof(buf);
-    GetTokenInformation(token, TokenUser, (void *)buf, size, &size);
+    GetTokenInformation(token, TokenUser, buf, size, &size);
     user = (PTOKEN_USER)buf;
     pConvertSidToStringSidA(user->User.Sid, usersid);
     return 1;
-- 
1.6.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090115/c68c1dac/attachment-0001.pgp 


More information about the wine-patches mailing list