Commit 98beaff2 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Warning fixes for gcc 4.0.

parent 0596fe15
......@@ -410,14 +410,14 @@ DEVMODEW * WINAPI GdiConvertToDevmodeW(const DEVMODEA *dmA)
dmW = HeapAlloc(GetProcessHeap(), 0, dmW_size + dmA->dmDriverExtra);
if (!dmW) return NULL;
MultiByteToWideChar(CP_ACP, 0, dmA->dmDeviceName, CCHDEVICENAME,
MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmDeviceName, CCHDEVICENAME,
dmW->dmDeviceName, CCHDEVICENAME);
/* copy slightly more, to avoid long computations */
memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion, dmA->dmSize - CCHDEVICENAME);
if (dmA->dmSize >= (const char *)dmA->dmFormName - (const char *)dmA + CCHFORMNAME)
{
MultiByteToWideChar(CP_ACP, 0, dmA->dmFormName, CCHFORMNAME,
MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmFormName, CCHFORMNAME,
dmW->dmFormName, CCHFORMNAME);
if (dmA->dmSize > (const char *)&dmA->dmLogPixels - (const char *)dmA)
memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA->dmSize - ((const char *)&dmA->dmLogPixels - (const char *)dmA));
......
......@@ -229,13 +229,13 @@ static void FONT_EnumLogFontExWTo16( const ENUMLOGFONTEXW *fontW, LPENUMLOGFONTE
FONT_LogFontWTo16( (LPLOGFONTW)fontW, (LPLOGFONT16)font16);
WideCharToMultiByte( CP_ACP, 0, fontW->elfFullName, -1,
font16->elfFullName, LF_FULLFACESIZE, NULL, NULL );
(LPSTR) font16->elfFullName, LF_FULLFACESIZE, NULL, NULL );
font16->elfFullName[LF_FULLFACESIZE-1] = '\0';
WideCharToMultiByte( CP_ACP, 0, fontW->elfStyle, -1,
font16->elfStyle, LF_FACESIZE, NULL, NULL );
(LPSTR) font16->elfStyle, LF_FACESIZE, NULL, NULL );
font16->elfStyle[LF_FACESIZE-1] = '\0';
WideCharToMultiByte( CP_ACP, 0, fontW->elfScript, -1,
font16->elfScript, LF_FACESIZE, NULL, NULL );
(LPSTR) font16->elfScript, LF_FACESIZE, NULL, NULL );
font16->elfScript[LF_FACESIZE-1] = '\0';
}
......@@ -244,13 +244,13 @@ static void FONT_EnumLogFontExWToA( const ENUMLOGFONTEXW *fontW, LPENUMLOGFONTEX
FONT_LogFontWToA( (LPLOGFONTW)fontW, (LPLOGFONTA)fontA);
WideCharToMultiByte( CP_ACP, 0, fontW->elfFullName, -1,
fontA->elfFullName, LF_FULLFACESIZE, NULL, NULL );
(LPSTR) fontA->elfFullName, LF_FULLFACESIZE, NULL, NULL );
fontA->elfFullName[LF_FULLFACESIZE-1] = '\0';
WideCharToMultiByte( CP_ACP, 0, fontW->elfStyle, -1,
fontA->elfStyle, LF_FACESIZE, NULL, NULL );
(LPSTR) fontA->elfStyle, LF_FACESIZE, NULL, NULL );
fontA->elfStyle[LF_FACESIZE-1] = '\0';
WideCharToMultiByte( CP_ACP, 0, fontW->elfScript, -1,
fontA->elfScript, LF_FACESIZE, NULL, NULL );
(LPSTR) fontA->elfScript, LF_FACESIZE, NULL, NULL );
fontA->elfScript[LF_FACESIZE-1] = '\0';
}
......
......@@ -848,7 +848,7 @@ static void load_fontconfig_fonts(void)
FcFontSet *fontset;
FcValue v;
int i, len;
const char *ext;
const char *file, *ext;
fc_handle = wine_dlopen(SONAME_LIBFONTCONFIG, RTLD_NOW, NULL, 0);
if(!fc_handle) {
......@@ -881,16 +881,17 @@ LOAD_FUNCPTR(FcPatternGet);
if(pFcPatternGet(fontset->fonts[i], FC_FILE, 0, &v) != FcResultMatch)
continue;
if(v.type != FcTypeString) continue;
TRACE("fontconfig: %s\n", v.u.s);
file = (LPCSTR) v.u.s;
TRACE("fontconfig: %s\n", file);
/* We're just interested in OT/TT fonts for now, so this hack just
picks up the standard extensions to save time loading every other
font */
len = strlen(v.u.s);
len = strlen( file );
if(len < 4) continue;
ext = v.u.s + len - 3;
ext = &file[ len - 3 ];
if(!strcasecmp(ext, "ttf") || !strcasecmp(ext, "ttc") || !strcasecmp(ext, "otf"))
AddFontFileToList(v.u.s, NULL, ADDFONT_EXTERNAL_FONT);
AddFontFileToList(file, NULL, ADDFONT_EXTERNAL_FONT);
}
pFcFontSetDestroy(fontset);
pFcObjectSetDestroy(os);
......
......@@ -295,10 +295,10 @@ static void dump_mf_bits (const HMETAFILE mf, const char *desc)
* otherwise returns the number of non-matching bytes.
*/
static int compare_mf_bits (const HMETAFILE mf, const char *bits, UINT bsize,
static int compare_mf_bits (const HMETAFILE mf, const unsigned char *bits, UINT bsize,
const char *desc)
{
char buf[MF_BUFSIZE];
unsigned char buf[MF_BUFSIZE];
UINT mfsize, i;
int diff;
......
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