Michael Stefaniuc : janitorial: Remove superfluous casts of void pointers to other pointer types.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 27 09:11:28 CDT 2007


Module: wine
Branch: master
Commit: 0152ec037593e295984ce9d2c491e74a3266b002
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0152ec037593e295984ce9d2c491e74a3266b002

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Jun 27 00:16:11 2007 +0200

janitorial: Remove superfluous casts of void pointers to other pointer types.

---

 dlls/amstream/amstream.c       |    2 +-
 dlls/msxml3/nodemap.c          |    2 +-
 dlls/riched20/reader.c         |    2 +-
 dlls/shlwapi/tests/string.c    |    2 +-
 dlls/user32/tests/cursoricon.c |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c
index 422239c..692403b 100644
--- a/dlls/amstream/amstream.c
+++ b/dlls/amstream/amstream.c
@@ -260,7 +260,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
     hr = MediaStream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream);
     if (SUCCEEDED(hr))
     {
-        pNewStreams = (IMediaStream**)CoTaskMemAlloc((This->nbStreams+1)*sizeof(IMediaStream*));
+        pNewStreams = CoTaskMemAlloc((This->nbStreams+1)*sizeof(IMediaStream*));
         if (!pNewStreams)
         {
             IMediaStream_Release(pStream);
diff --git a/dlls/msxml3/nodemap.c b/dlls/msxml3/nodemap.c
index fa17787..94b3f62 100644
--- a/dlls/msxml3/nodemap.c
+++ b/dlls/msxml3/nodemap.c
@@ -150,7 +150,7 @@ xmlChar *xmlChar_from_wchar( LPWSTR str )
     xmlChar *xmlstr;
 
     len = WideCharToMultiByte( CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL );
-    xmlstr = (xmlChar*) HeapAlloc( GetProcessHeap(), 0, len );
+    xmlstr = HeapAlloc( GetProcessHeap(), 0, len );
     if ( xmlstr )
         WideCharToMultiByte( CP_UTF8, 0, str, -1, (LPSTR) xmlstr, len, NULL, NULL );
     return xmlstr;
diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c
index 7fb641b..0cf8ca7 100644
--- a/dlls/riched20/reader.c
+++ b/dlls/riched20/reader.c
@@ -2682,7 +2682,7 @@ static void
 RTFFlushCPOutputBuffer(RTF_Info *info)
 {
         int bufferMax = info->dwCPOutputCount * 2 * sizeof(WCHAR);
-        WCHAR *buffer = (WCHAR *)RTFAlloc(bufferMax);
+        WCHAR *buffer = RTFAlloc(bufferMax);
         int length;
 
         length = MultiByteToWideChar(info->codePage, 0, info->cpOutputBuffer,
diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c
index c868e1e..895d767 100644
--- a/dlls/shlwapi/tests/string.c
+++ b/dlls/shlwapi/tests/string.c
@@ -605,7 +605,7 @@ static void test_StrCmpW(void)
 static WCHAR *CoDupStrW(const char* src)
 {
   INT len = MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0);
-  WCHAR* szTemp = (WCHAR*)CoTaskMemAlloc(len * sizeof(WCHAR));
+  WCHAR* szTemp = CoTaskMemAlloc(len * sizeof(WCHAR));
   MultiByteToWideChar(CP_ACP, 0, src, -1, szTemp, len);
   return szTemp;
 }
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index 6d93138..84b9fe3 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -94,7 +94,7 @@ static void test_CopyImage_Bitmap(int depth)
     unsigned int i;
 
     /* Create a device-independent bitmap (DIB) */
-    info = (BITMAPINFO *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD));
+    info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD));
     info->bmiHeader.biSize = sizeof(info->bmiHeader);
     info->bmiHeader.biWidth = 2;
     info->bmiHeader.biHeight = 2;




More information about the wine-cvs mailing list