shell32: Fix compiler warnings with flag -Wcast-qual.
This commit is contained in:
parent
dc525dabd6
commit
cc7eaa3293
@ -35,7 +35,7 @@
|
|||||||
WINE_DEFAULT_DEBUG_CHANNEL(pidl);
|
WINE_DEFAULT_DEBUG_CHANNEL(pidl);
|
||||||
|
|
||||||
static
|
static
|
||||||
LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
|
LPCITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
WORD len;
|
WORD len;
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
|
|||||||
len = pidl->mkid.cb;
|
len = pidl->mkid.cb;
|
||||||
if (len)
|
if (len)
|
||||||
{
|
{
|
||||||
return (LPITEMIDLIST) (((LPBYTE)pidl)+len);
|
return (LPCITEMIDLIST) (((const BYTE*)pidl)+len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -57,17 +57,17 @@ BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
|
const PIDLDATA* _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
if(pidl && pidl->mkid.cb != 0x00)
|
if(pidl && pidl->mkid.cb != 0x00)
|
||||||
return (LPPIDLDATA)pidl->mkid.abID;
|
return (const PIDLDATA*)pidl->mkid.abID;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
|
LPCSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
|
const PIDLDATA* pdata =_dbg_ILGetDataPointer(pidl);
|
||||||
|
|
||||||
if (pdata)
|
if (pdata)
|
||||||
{
|
{
|
||||||
@ -103,9 +103,9 @@ LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl)
|
LPCWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
|
const PIDLDATA* pdata =_dbg_ILGetDataPointer(pidl);
|
||||||
|
|
||||||
if (pdata)
|
if (pdata)
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
case PT_VALUEW:
|
case PT_VALUEW:
|
||||||
return (LPWSTR)pdata->u.file.szNames;
|
return (LPCWSTR)pdata->u.file.szNames;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -148,9 +148,9 @@ LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl)
|
|||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
|
LPCSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
|
const PIDLDATA* pdata =_dbg_ILGetDataPointer(pidl);
|
||||||
|
|
||||||
if (pdata)
|
if (pdata)
|
||||||
{
|
{
|
||||||
@ -170,9 +170,9 @@ LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
LPWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl)
|
LPCWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl)
|
||||||
{
|
{
|
||||||
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
|
const PIDLDATA* pdata =_dbg_ILGetDataPointer(pidl);
|
||||||
|
|
||||||
if (pdata)
|
if (pdata)
|
||||||
{
|
{
|
||||||
@ -190,7 +190,7 @@ LPWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
case PT_VALUEW:
|
case PT_VALUEW:
|
||||||
return (LPWSTR)(pdata->u.file.szNames + lstrlenW ((LPWSTR)pdata->u.file.szNames) + 1);
|
return (LPCWSTR)(pdata->u.file.szNames + lstrlenW ((LPCWSTR)pdata->u.file.szNames) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -218,8 +218,8 @@ IID* _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl)
|
|||||||
static
|
static
|
||||||
void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
|
void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
|
||||||
{
|
{
|
||||||
LPSTR szSrc;
|
LPCSTR szSrc;
|
||||||
LPWSTR szSrcW;
|
LPCWSTR szSrcW;
|
||||||
GUID const * riid;
|
GUID const * riid;
|
||||||
|
|
||||||
if (!pidl) return;
|
if (!pidl) return;
|
||||||
@ -277,10 +277,10 @@ void pdump (LPCITEMIDLIST pidl)
|
|||||||
if (_ILIsUnicode(pidltemp))
|
if (_ILIsUnicode(pidltemp))
|
||||||
{
|
{
|
||||||
DWORD dwAttrib = 0;
|
DWORD dwAttrib = 0;
|
||||||
LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp);
|
const PIDLDATA* pData = _dbg_ILGetDataPointer(pidltemp);
|
||||||
DWORD type = pData ? pData->type : 0;
|
DWORD type = pData ? pData->type : 0;
|
||||||
LPWSTR szLongName = _dbg_ILGetTextPointerW(pidltemp);
|
LPCWSTR szLongName = _dbg_ILGetTextPointerW(pidltemp);
|
||||||
LPWSTR szShortName = _dbg_ILGetSTextPointerW(pidltemp);
|
LPCWSTR szShortName = _dbg_ILGetSTextPointerW(pidltemp);
|
||||||
char szName[MAX_PATH];
|
char szName[MAX_PATH];
|
||||||
|
|
||||||
_dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH);
|
_dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH);
|
||||||
@ -294,10 +294,10 @@ void pdump (LPCITEMIDLIST pidl)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
DWORD dwAttrib = 0;
|
DWORD dwAttrib = 0;
|
||||||
LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp);
|
const PIDLDATA* pData = _dbg_ILGetDataPointer(pidltemp);
|
||||||
DWORD type = pData ? pData->type : 0;
|
DWORD type = pData ? pData->type : 0;
|
||||||
LPSTR szLongName = _dbg_ILGetTextPointer(pidltemp);
|
LPCSTR szLongName = _dbg_ILGetTextPointer(pidltemp);
|
||||||
LPSTR szShortName = _dbg_ILGetSTextPointer(pidltemp);
|
LPCSTR szShortName = _dbg_ILGetSTextPointer(pidltemp);
|
||||||
char szName[MAX_PATH];
|
char szName[MAX_PATH];
|
||||||
|
|
||||||
_dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH);
|
_dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH);
|
||||||
|
@ -809,8 +809,9 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LPWSTR p,space;
|
LPCWSTR p;
|
||||||
for (p=(LPWSTR)start; (space=strchrW(p, ' ')); p=space+1)
|
LPWSTR space;
|
||||||
|
for (p=start; (space=strchrW(p, ' ')); p=space+1)
|
||||||
{
|
{
|
||||||
int idx = space-start;
|
int idx = space-start;
|
||||||
memcpy(command, start, idx*sizeof(WCHAR));
|
memcpy(command, start, idx*sizeof(WCHAR));
|
||||||
|
@ -358,7 +358,7 @@ HRESULT TRASH_UnpackItemID(LPCSHITEMID id, WIN32_FIND_DATAW *data)
|
|||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if (data != NULL)
|
if (data != NULL)
|
||||||
*data = *(WIN32_FIND_DATAW *)(id->abID+1);
|
*data = *(const WIN32_FIND_DATAW *)(id->abID+1);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user