Module: wine Branch: master Commit: 3069ad44cb87cdbc82e7116f21370b9043ae4306 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3069ad44cb87cdbc82e7116f21...
Author: Mikhail Maroukhine mikolg@yandex.ru Date: Sun Mar 28 19:52:16 2010 +0700
winex11.drv: Fix compiler warnings with flag -Wcast-qual.
---
dlls/winex11.drv/dib.c | 3 ++- dlls/winex11.drv/ime.c | 4 ++-- dlls/winex11.drv/settings.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 2021aab..ed65af3 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -4049,7 +4049,8 @@ INT CDECL X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT start { unsigned int srcwidthb = ds.dsBm.bmWidthBytes; int dstwidthb = X11DRV_DIB_GetDIBWidthBytes( width, descr.infoBpp ); - LPBYTE dbits = physBitmap->base, sbits = (LPBYTE)bits + (startscan * srcwidthb); + LPBYTE dbits = physBitmap->base; + const BYTE *sbits = (const BYTE*)bits + (startscan * srcwidthb); int widthb; UINT y;
diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index f9e0538..2fcd285 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -189,7 +189,7 @@ static int updateField(DWORD origLen, DWORD origOffset, DWORD currentOffset, return currentOffset; }
-static HIMCC updateCompStr(HIMCC old, LPWSTR compstr, DWORD len) +static HIMCC updateCompStr(HIMCC old, LPCWSTR compstr, DWORD len) { /* we need to make sure the CompStr, CompClaus and CompAttr fields are all * set and correct */ @@ -923,7 +923,7 @@ BOOL WINAPI ImeSetCompositionString(HIMC hIMC, DWORD dwIndex, LPCVOID lpComp,
if (dwCompLen && lpComp) { - newCompStr = updateCompStr(lpIMC->hCompStr, (LPWSTR)lpComp, dwCompLen / sizeof(WCHAR)); + newCompStr = updateCompStr(lpIMC->hCompStr, (LPCWSTR)lpComp, dwCompLen / sizeof(WCHAR)); ImmDestroyIMCC(lpIMC->hCompStr); lpIMC->hCompStr = newCompStr;
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index e2aafbc..7f0753a 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -243,7 +243,7 @@ static BOOL write_registry_settings(const DEVMODEW *dm) return FALSE;
#define set_value(name, data) \ - if (RegSetValueExA(hkey, name, 0, REG_DWORD, (LPBYTE)(data), sizeof(DWORD))) \ + if (RegSetValueExA(hkey, name, 0, REG_DWORD, (const BYTE*)(data), sizeof(DWORD))) \ ret = FALSE
set_value("DefaultSettings.BitsPerPel", &dm->dmBitsPerPel);