From b64186ad22b07b77dec2b0d92e99f0605ed34713 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 7 Jun 2005 20:30:30 +0000 Subject: [PATCH] Warning fixes for -Wmissing-declarations and -Wwrite-strings. --- dlls/shell32/debughlp.c | 6 +++--- dlls/shell32/shell32_main.h | 3 +++ dlls/shell32/shfldr_fs.c | 2 +- dlls/shell32/shlview.c | 3 --- dlls/shell32/shv_item_cmenu.c | 2 +- dlls/shell32/tests/shlfolder.c | 12 ++++++------ 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/shell32/debughlp.c b/dlls/shell32/debughlp.c index 2282f6c9418..28e6a2df673 100644 --- a/dlls/shell32/debughlp.c +++ b/dlls/shell32/debughlp.c @@ -295,8 +295,8 @@ static char shdebugstr_buf2[100]; static char * shdebugstr_buf = shdebugstr_buf1; static struct { - REFIID riid; - char *name; + REFIID riid; + const char *name; } InterfaceDesc[] = { {&IID_IUnknown, "IID_IUnknown"}, {&IID_IClassFactory, "IID_IClassFactory"}, @@ -325,7 +325,7 @@ static struct { const char * shdebugstr_guid( const struct _GUID *id ) { int i; - char* name = NULL; + const char* name = NULL; char clsidbuf[100]; shdebugstr_buf = (shdebugstr_buf == shdebugstr_buf1) ? shdebugstr_buf2 : shdebugstr_buf1; diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index f372dc8db2f..51fbc062095 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -171,6 +171,9 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD); BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16); BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); +void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, + UINT wID, UINT fType, LPCSTR dwTypeData, UINT fState); + inline static BOOL SHELL_OsIsUnicode(void) { /* if high-bit of version is 0, we are emulating NT */ diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index af3e7e4057b..c99a34304ff 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -1050,7 +1050,7 @@ ISFHelper_fnGetUniqueName (ISFHelper * iface, LPSTR lpName, UINT uLen) IEnumIDList *penum; HRESULT hr; char szText[MAX_PATH]; - char *szNewFolder = "New Folder"; + const char *szNewFolder = "New Folder"; TRACE ("(%p)(%s %u)\n", This, lpName, uLen); diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 03d731185b7..3514bb72ee7 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -140,9 +140,6 @@ static const IViewObjectVtbl vovt; #define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp) #define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp) -extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, - UINT wID, UINT fType, LPSTR dwTypeData, UINT fState); - /* Items merged into the toolbar and and the filemenu */ diff --git a/dlls/shell32/shv_item_cmenu.c b/dlls/shell32/shv_item_cmenu.c index c0bdf619344..1103080954a 100644 --- a/dlls/shell32/shv_item_cmenu.c +++ b/dlls/shell32/shv_item_cmenu.c @@ -186,7 +186,7 @@ void WINAPI _InsertMenuItem ( BOOL fByPosition, UINT wID, UINT fType, - LPSTR dwTypeData, + LPCSTR dwTypeData, UINT fState) { MENUITEMINFOA mii; diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index c6bc1e2967e..96d0bc66aec 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -38,10 +38,10 @@ #include "wine/test.h" -IMalloc *ppM; +static IMalloc *ppM; /* creates a file with the specified name for tests */ -void CreateTestFile(const CHAR *name) +static void CreateTestFile(const CHAR *name) { HANDLE file; DWORD written; @@ -57,7 +57,7 @@ void CreateTestFile(const CHAR *name) /* initializes the tests */ -void CreateFilesFolders(void) +static void CreateFilesFolders(void) { CreateDirectoryA(".\\testdir", NULL); CreateDirectoryA(".\\testdir\\test.txt", NULL); @@ -69,7 +69,7 @@ void CreateFilesFolders(void) } /* cleans after tests */ -void Cleanup(void) +static void Cleanup(void) { DeleteFileA(".\\testdir\\test1.txt"); DeleteFileA(".\\testdir\\test2.txt"); @@ -82,7 +82,7 @@ void Cleanup(void) /* perform test */ -void test_EnumObjects(IShellFolder *iFolder) +static void test_EnumObjects(IShellFolder *iFolder) { IEnumIDList *iEnumList; ITEMIDLIST *newPIDL, *(idlArr [5]); @@ -150,7 +150,7 @@ void test_EnumObjects(IShellFolder *iFolder) IMalloc_Free(ppM, idlArr[i]); } -void test_BindToObject() +static void test_BindToObject(void) { HRESULT hr; UINT cChars; -- 2.11.4.GIT