Commit 934ed50d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

version: Remove superfluous pointer casts.

parent e202baab
...@@ -547,7 +547,7 @@ BOOL WINAPI GetFileVersionInfoW( LPCWSTR filename, DWORD handle, ...@@ -547,7 +547,7 @@ BOOL WINAPI GetFileVersionInfoW( LPCWSTR filename, DWORD handle,
DWORD datasize, LPVOID data ) DWORD datasize, LPVOID data )
{ {
DWORD len; DWORD len;
VS_VERSION_INFO_STRUCT32* vvis = (VS_VERSION_INFO_STRUCT32*)data; VS_VERSION_INFO_STRUCT32* vvis = data;
TRACE("(%s,%d,size=%d,data=%p)\n", TRACE("(%s,%d,size=%d,data=%p)\n",
debugstr_w(filename), handle, datasize, data ); debugstr_w(filename), handle, datasize, data );
...@@ -769,7 +769,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, ...@@ -769,7 +769,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
{ {
static const char rootA[] = "\\"; static const char rootA[] = "\\";
static const char varfileinfoA[] = "\\VarFileInfo\\Translation"; static const char varfileinfoA[] = "\\VarFileInfo\\Translation";
const VS_VERSION_INFO_STRUCT16 *info = (const VS_VERSION_INFO_STRUCT16 *)pBlock; const VS_VERSION_INFO_STRUCT16 *info = pBlock;
TRACE("(%p,%s,%p,%p)\n", TRACE("(%p,%s,%p,%p)\n",
pBlock, debugstr_a(lpSubBlock), lplpBuffer, puLen ); pBlock, debugstr_a(lpSubBlock), lplpBuffer, puLen );
...@@ -806,7 +806,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, ...@@ -806,7 +806,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
LPSTR lpBufferA = (LPSTR)pBlock + info->wLength + 4; LPSTR lpBufferA = (LPSTR)pBlock + info->wLength + 4;
DWORD pos = (LPCSTR)*lplpBuffer - (LPCSTR)pBlock; DWORD pos = (LPCSTR)*lplpBuffer - (LPCSTR)pBlock;
len = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)*lplpBuffer, -1, len = WideCharToMultiByte(CP_ACP, 0, *lplpBuffer, -1,
lpBufferA + pos, info->wLength - pos, NULL, NULL); lpBufferA + pos, info->wLength - pos, NULL, NULL);
*lplpBuffer = lpBufferA + pos; *lplpBuffer = lpBufferA + pos;
*puLen = len; *puLen = len;
...@@ -828,7 +828,7 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock, ...@@ -828,7 +828,7 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
static const WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o', static const WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o',
'\\','T','r','a','n','s','l','a','t','i','o','n', 0 }; '\\','T','r','a','n','s','l','a','t','i','o','n', 0 };
const VS_VERSION_INFO_STRUCT32 *info = (const VS_VERSION_INFO_STRUCT32 *)pBlock; const VS_VERSION_INFO_STRUCT32 *info = pBlock;
TRACE("(%p,%s,%p,%p)\n", TRACE("(%p,%s,%p,%p)\n",
pBlock, debugstr_w(lpSubBlock), lplpBuffer, puLen ); pBlock, debugstr_w(lpSubBlock), lplpBuffer, puLen );
...@@ -866,7 +866,7 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock, ...@@ -866,7 +866,7 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
DWORD pos = (LPCSTR)*lplpBuffer - (LPCSTR)pBlock; DWORD pos = (LPCSTR)*lplpBuffer - (LPCSTR)pBlock;
DWORD max = (info->wLength - sizeof(VS_FIXEDFILEINFO)) * 4 - info->wLength; DWORD max = (info->wLength - sizeof(VS_FIXEDFILEINFO)) * 4 - info->wLength;
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*lplpBuffer, -1, len = MultiByteToWideChar(CP_ACP, 0, *lplpBuffer, -1,
lpBufferW + pos, max/sizeof(WCHAR) - pos ); lpBufferW + pos, max/sizeof(WCHAR) - pos );
*lplpBuffer = lpBufferW + pos; *lplpBuffer = lpBufferW + pos;
*puLen = len; *puLen = len;
......
...@@ -343,7 +343,7 @@ static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid, ...@@ -343,7 +343,7 @@ static BOOL find_pe_resource( HFILE lzfd, LPCSTR typeid, LPCSTR resid,
/* Find resource */ /* Find resource */
resDir = resSection + (resDataDir->VirtualAddress - sections[i].VirtualAddress); resDir = resSection + (resDataDir->VirtualAddress - sections[i].VirtualAddress);
resPtr = (const IMAGE_RESOURCE_DIRECTORY*)resDir; resPtr = resDir;
resPtr = find_entry_by_name( resPtr, typeid, resDir ); resPtr = find_entry_by_name( resPtr, typeid, resDir );
if ( !resPtr ) if ( !resPtr )
{ {
......
...@@ -383,7 +383,7 @@ static void test_32bit_win(void) ...@@ -383,7 +383,7 @@ static void test_32bit_win(void)
if (is_unicode_enabled) if (is_unicode_enabled)
{ {
VS_VERSION_INFO_STRUCT32 *vvis = (VS_VERSION_INFO_STRUCT32 *)pVersionInfoW; VS_VERSION_INFO_STRUCT32 *vvis = pVersionInfoW;
ok ( retvalW == ((vvis->wLength * 2) + 4) || retvalW == (vvis->wLength * 1.5), ok ( retvalW == ((vvis->wLength * 2) + 4) || retvalW == (vvis->wLength * 1.5),
"Structure is not of the correct size\n"); "Structure is not of the correct size\n");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment