SHELL32: warning fixes for -Wmissing-declarations and -Wwrite-strings

Mike McCormack mike at codeweavers.com
Tue Jun 7 04:34:52 CDT 2005


ChangeLog:
* warning fixes for -Wmissing-declarations and -Wwrite-strings
-------------- next part --------------
Index: dlls/shell32/debughlp.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/debughlp.c,v
retrieving revision 1.22
diff -u -p -r1.22 debughlp.c
--- dlls/shell32/debughlp.c	18 Apr 2005 10:30:55 -0000	1.22
+++ dlls/shell32/debughlp.c	7 Jun 2005 09:35:04 -0000
@@ -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;
Index: dlls/shell32/shell32_main.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v
retrieving revision 1.97
diff -u -p -r1.97 shell32_main.h
--- dlls/shell32/shell32_main.h	24 May 2005 11:45:47 -0000	1.97
+++ dlls/shell32/shell32_main.h	7 Jun 2005 09:35:04 -0000
@@ -171,6 +171,9 @@ HGLOBAL16   WINAPI InternalExtractIcon16
 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 */
Index: dlls/shell32/shfldr_fs.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_fs.c,v
retrieving revision 1.42
diff -u -p -r1.42 shfldr_fs.c
--- dlls/shell32/shfldr_fs.c	6 Jun 2005 19:50:36 -0000	1.42
+++ dlls/shell32/shfldr_fs.c	7 Jun 2005 09:35:05 -0000
@@ -1050,7 +1050,7 @@ ISFHelper_fnGetUniqueName (ISFHelper * i
     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);
 
Index: dlls/shell32/shlview.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlview.c,v
retrieving revision 1.115
diff -u -p -r1.115 shlview.c
--- dlls/shell32/shlview.c	6 Jun 2005 19:50:36 -0000	1.115
+++ dlls/shell32/shlview.c	7 Jun 2005 09:35:05 -0000
@@ -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
 */
Index: dlls/shell32/shv_item_cmenu.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shv_item_cmenu.c,v
retrieving revision 1.31
diff -u -p -r1.31 shv_item_cmenu.c
--- dlls/shell32/shv_item_cmenu.c	6 Jun 2005 19:50:36 -0000	1.31
+++ dlls/shell32/shv_item_cmenu.c	7 Jun 2005 09:35:05 -0000
@@ -186,7 +186,7 @@ void WINAPI _InsertMenuItem (
 	BOOL fByPosition,
 	UINT wID,
 	UINT fType,
-	LPSTR dwTypeData,
+	LPCSTR dwTypeData,
 	UINT fState)
 {
 	MENUITEMINFOA	mii;
Index: dlls/shell32/tests/shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/tests/shlfolder.c,v
retrieving revision 1.7
diff -u -p -r1.7 shlfolder.c
--- dlls/shell32/tests/shlfolder.c	6 Jun 2005 10:04:15 -0000	1.7
+++ dlls/shell32/tests/shlfolder.c	7 Jun 2005 09:35:05 -0000
@@ -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 *iFol
         IMalloc_Free(ppM, idlArr[i]);
 }
 
-void test_BindToObject()
+static void test_BindToObject(void)
 {
     HRESULT hr;
     UINT cChars;


More information about the wine-patches mailing list