Andrew Talbot : shell32: Sign-compare warnings fix.
Alexandre Julliard
julliard at winehq.org
Wed Nov 12 07:18:43 CST 2008
Module: wine
Branch: master
Commit: 45d7897c626c470d7039cec1bc9b1ae8a597f4e3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=45d7897c626c470d7039cec1bc9b1ae8a597f4e3
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Tue Nov 11 22:27:29 2008 +0000
shell32: Sign-compare warnings fix.
---
dlls/shell32/control.c | 5 +++--
dlls/shell32/shelllink.c | 2 +-
dlls/shell32/shfldr_unixfs.c | 7 ++++---
dlls/shell32/shlexec.c | 4 ++--
dlls/shell32/shlfileop.c | 2 +-
dlls/shell32/xdg.c | 3 ++-
6 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c
index 83b4418..464b9d1 100644
--- a/dlls/shell32/control.c
+++ b/dlls/shell32/control.c
@@ -248,7 +248,8 @@ static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW* cs)
HMENU hMenu, hSubMenu;
CPlApplet* applet;
MENUITEMINFOW mii;
- int menucount, i, index;
+ unsigned int i;
+ int menucount, index;
CPlItem *item;
LVITEMW lvItem;
INITCOMMONCONTROLSEX icex;
@@ -340,7 +341,7 @@ static void Control_FreeCPlItems(HWND hWnd, CPanel *panel)
{
HMENU hMenu, hSubMenu;
MENUITEMINFOW mii;
- int i;
+ unsigned int i;
/* get the File menu */
hMenu = GetMenu(hWnd);
diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
index be83e76..b4a686e 100644
--- a/dlls/shell32/shelllink.c
+++ b/dlls/shell32/shelllink.c
@@ -686,7 +686,7 @@ static HRESULT Stream_LoadLocation( IStream *stm,
char *p = NULL;
LOCATION_INFO *loc;
HRESULT r;
- int n;
+ DWORD n;
r = Stream_ReadChunk( stm, (LPVOID*) &p );
if( FAILED(r) )
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 5f0ae3f..3a550a1 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1204,7 +1204,8 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_SetNameOf(IShellFolder2* iface, H
static const WCHAR awcInvalidChars[] = { '\\', '/', ':', '*', '?', '"', '<', '>', '|' };
char szSrc[FILENAME_MAX], szDest[FILENAME_MAX];
WCHAR wszSrcRelative[MAX_PATH];
- int cBasePathLen = lstrlenA(This->m_pszPath), i;
+ unsigned int i;
+ int cBasePathLen = lstrlenA(This->m_pszPath);
struct stat statDest;
LPITEMIDLIST pidlSrc, pidlDest, pidlRelativeDest;
LPOLESTR lpwszName;
@@ -1802,7 +1803,7 @@ static HRESULT UNIXFS_delete_with_shfileop(UnixFolder *This, UINT cidl, const LP
LPWSTR wszPathsList, wszListPos;
SHFILEOPSTRUCTW op;
HRESULT ret;
- int i;
+ UINT i;
lstrcpyA(szAbsolute, This->m_pszPath);
pszRelative = szAbsolute + lstrlenA(szAbsolute);
@@ -1854,7 +1855,7 @@ static HRESULT UNIXFS_delete_with_syscalls(UnixFolder *This, UINT cidl, const LP
{
char szAbsolute[FILENAME_MAX], *pszRelative;
static const WCHAR empty[] = {0};
- int i;
+ UINT i;
if (!SHELL_ConfirmYesNoW(GetActiveWindow(), ASK_DELETE_SELECTED, empty))
return S_OK;
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
index 5b5785b..e95bad1 100644
--- a/dlls/shell32/shlexec.c
+++ b/dlls/shell32/shlexec.c
@@ -1327,11 +1327,11 @@ static BOOL SHELL_translate_idlist( LPSHELLEXECUTEINFOW sei, LPWSTR wszParameter
if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW(sei->lpIDList, buffer, sizeof(buffer)))) {
if (buffer[0]==':' && buffer[1]==':') {
/* open shell folder for the specified class GUID */
- if (lstrlenW(buffer) + 1 > parametersLen)
+ if (strlenW(buffer) + 1 > parametersLen)
ERR("parameters len exceeds buffer size (%i > %i), truncating\n",
lstrlenW(buffer) + 1, parametersLen);
lstrcpynW(wszParameters, buffer, parametersLen);
- if (lstrlenW(wExplorer) > dwApplicationNameLen)
+ if (strlenW(wExplorer) > dwApplicationNameLen)
ERR("application len exceeds buffer size (%i > %i), truncating\n",
lstrlenW(wExplorer) + 1, dwApplicationNameLen);
lstrcpynW(wszApplicationName, wExplorer, dwApplicationNameLen);
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 7c10588..d2514f0 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -1717,7 +1717,7 @@ HRESULT WINAPI SHPathPrepareForWriteA(HWND hwnd, IUnknown *modless, LPCSTR path,
*/
HRESULT WINAPI SHPathPrepareForWriteW(HWND hwnd, IUnknown *modless, LPCWSTR path, DWORD flags)
{
- HRESULT res;
+ DWORD res;
DWORD err;
LPCWSTR realpath;
int len;
diff --git a/dlls/shell32/xdg.c b/dlls/shell32/xdg.c
index ba15a45..d7f84ab 100644
--- a/dlls/shell32/xdg.c
+++ b/dlls/shell32/xdg.c
@@ -890,7 +890,8 @@ HRESULT XDG_UserDirLookup(const char * const *xdg_dirs, const unsigned int num_d
char **out;
char *home_dir, *config_file;
char buffer[512];
- int i, len;
+ int len;
+ unsigned int i;
HRESULT hr;
*out_ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_dirs * sizeof(char *));
More information about the wine-cvs
mailing list