gdi32: Avoid some pointer casts.

This commit is contained in:
Alexandre Julliard 2009-01-26 15:09:18 +01:00
parent 7d657ed8f4
commit 3939cb5c82
1 changed files with 5 additions and 6 deletions

View File

@ -2555,7 +2555,6 @@ BOOL WineEngInit(void)
static const WCHAR pathW[] = {'P','a','t','h',0}; static const WCHAR pathW[] = {'P','a','t','h',0};
HKEY hkey; HKEY hkey;
DWORD valuelen, datalen, i = 0, type, dlen, vlen; DWORD valuelen, datalen, i = 0, type, dlen, vlen;
LPVOID data;
WCHAR windowsdir[MAX_PATH]; WCHAR windowsdir[MAX_PATH];
char *unixname; char *unixname;
HANDLE font_mutex; HANDLE font_mutex;
@ -2605,7 +2604,7 @@ BOOL WineEngInit(void)
if(RegOpenKeyW(HKEY_LOCAL_MACHINE, if(RegOpenKeyW(HKEY_LOCAL_MACHINE,
is_win9x() ? win9x_font_reg_key : winnt_font_reg_key, is_win9x() ? win9x_font_reg_key : winnt_font_reg_key,
&hkey) == ERROR_SUCCESS) { &hkey) == ERROR_SUCCESS) {
LPWSTR valueW; LPWSTR data, valueW;
RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL, RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
&valuelen, &datalen, NULL, NULL); &valuelen, &datalen, NULL, NULL);
@ -2616,17 +2615,17 @@ BOOL WineEngInit(void)
{ {
dlen = datalen * sizeof(WCHAR); dlen = datalen * sizeof(WCHAR);
vlen = valuelen; vlen = valuelen;
while(RegEnumValueW(hkey, i++, valueW, &vlen, NULL, &type, data, while(RegEnumValueW(hkey, i++, valueW, &vlen, NULL, &type, (LPBYTE)data,
&dlen) == ERROR_SUCCESS) { &dlen) == ERROR_SUCCESS) {
if(((LPWSTR)data)[0] && ((LPWSTR)data)[1] == ':') if(data[0] && (data[1] == ':'))
{ {
if((unixname = wine_get_unix_file_name((LPWSTR)data))) if((unixname = wine_get_unix_file_name(data)))
{ {
AddFontFileToList(unixname, NULL, NULL, ADDFONT_FORCE_BITMAP); AddFontFileToList(unixname, NULL, NULL, ADDFONT_FORCE_BITMAP);
HeapFree(GetProcessHeap(), 0, unixname); HeapFree(GetProcessHeap(), 0, unixname);
} }
} }
else if(dlen / 2 >= 6 && !strcmpiW(((LPWSTR)data) + dlen / 2 - 5, dot_fonW)) else if(dlen / 2 >= 6 && !strcmpiW(data + dlen / 2 - 5, dot_fonW))
{ {
WCHAR pathW[MAX_PATH]; WCHAR pathW[MAX_PATH];
static const WCHAR fmtW[] = {'%','s','\\','%','s','\0'}; static const WCHAR fmtW[] = {'%','s','\\','%','s','\0'};