PROGRAMS: fix more warnings

Mike McCormack mike at codeweavers.com
Fri Jun 10 06:02:05 CDT 2005


ChangeLog:
* fix more warnings
-------------- next part --------------
? programs/wordpad
? programs/regedit/rsrc.res.0QdpL2
? programs/uninstaller/uninstaller.rc
? programs/winedbg/gdiobj.c
Index: programs/regedit/listview.c
===================================================================
RCS file: /home/wine/wine/programs/regedit/listview.c,v
retrieving revision 1.15
diff -u -p -r1.15 listview.c
--- programs/regedit/listview.c	4 Jun 2005 10:01:25 -0000	1.15
+++ programs/regedit/listview.c	10 Jun 2005 11:03:26 -0000
@@ -159,7 +159,7 @@ static void AddEntryToList(HWND hwndLV, 
     index = ListView_InsertItem(hwndLV, &item);
     if (index != -1) {
         /*        LPTSTR pszText = NULL; */
-        LPTSTR pszText = _T("(cannot display value)");
+        LPCTSTR pszText = _T("(cannot display value)");
         switch (dwValType) {
         case REG_SZ:
         case REG_EXPAND_SZ:
Index: programs/taskmgr/perfpage.c
===================================================================
RCS file: /home/wine/wine/programs/taskmgr/perfpage.c,v
retrieving revision 1.1
diff -u -p -r1.1 perfpage.c
--- programs/taskmgr/perfpage.c	23 Mar 2004 01:19:54 -0000	1.1
+++ programs/taskmgr/perfpage.c	10 Jun 2005 11:03:27 -0000
@@ -69,7 +69,7 @@ static int	nPerformancePageHeight;
 static HANDLE	hPerformancePageEvent = NULL;	/*  When this event becomes signaled then we refresh the performance page */
 DWORD WINAPI	PerformancePageRefreshThread(void *lpParameter);
 
-void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference, int pos)
+static void AdjustFrameSize(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference, int pos)
 {
     RECT	rc;
     int		cx, cy, sx, sy;
@@ -105,12 +105,12 @@ void AdjustFrameSize(HWND hCntrl, HWND h
     InvalidateRect(hCntrl, NULL, TRUE);
 }
 		 
-void AdjustControlPostion(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference)
+static void AdjustControlPostion(HWND hCntrl, HWND hDlg, int nXDifference, int nYDifference)
 {
     AdjustFrameSize(hCntrl, hDlg, nXDifference, nYDifference, 0);
 }
 		 
-void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
+static void AdjustCntrlPos(int ctrl_id, HWND hDlg, int nXDifference, int nYDifference)
 {
     AdjustFrameSize(GetDlgItem(hDlg, ctrl_id), hDlg, nXDifference, nYDifference, 0);
 }
Index: programs/winebrowser/main.c
===================================================================
RCS file: /home/wine/wine/programs/winebrowser/main.c,v
retrieving revision 1.6
diff -u -p -r1.6 main.c
--- programs/winebrowser/main.c	21 Mar 2005 12:32:24 -0000	1.6
+++ programs/winebrowser/main.c	10 Jun 2005 11:03:27 -0000
@@ -44,7 +44,7 @@ int main (int argc, char *argv[])
   DWORD maxLength;
   CHAR szBrowsers[256];
   DWORD type;
-  CHAR *defaultBrowsers =
+  const CHAR *defaultBrowsers =
       "mozilla,firefox,netscape,konqueror,galeon,opera,dillo";
   char *browser;
   HKEY hkey;
Index: programs/winefile/winefile.c
===================================================================
RCS file: /home/wine/wine/programs/winefile/winefile.c,v
retrieving revision 1.50
diff -u -p -r1.50 winefile.c
--- programs/winefile/winefile.c	6 Jun 2005 10:02:43 -0000	1.50
+++ programs/winefile/winefile.c	10 Jun 2005 11:03:27 -0000
@@ -162,9 +162,6 @@ typedef struct {
 } ChildWnd;
 
 
-extern void WineLicense(HWND hwnd);
-extern void WineWarranty(HWND hwnd);
-
 
 static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND hwnd);
 static void set_curdir(ChildWnd* child, Entry* entry, int idx, HWND hwnd);
@@ -173,9 +170,9 @@ static void refresh_drives();
 static void get_path(Entry* dir, PTSTR path);
 static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols);
 
-LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
-LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
-LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
+static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
+static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
+static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
 
 
 /* globals */
@@ -671,7 +668,7 @@ static void free_strret(STRRET* str)
 }
 
 
-HRESULT name_from_pidl(IShellFolder* folder, LPITEMIDLIST pidl, LPTSTR buffer, int len, SHGDNF flags)
+static HRESULT name_from_pidl(IShellFolder* folder, LPITEMIDLIST pidl, LPTSTR buffer, int len, SHGDNF flags)
 {
 	STRRET str;
 
@@ -687,7 +684,7 @@ HRESULT name_from_pidl(IShellFolder* fol
 }
 
 
-HRESULT path_from_pidlA(IShellFolder* folder, LPITEMIDLIST pidl, LPSTR buffer, int len)
+static HRESULT path_from_pidlA(IShellFolder* folder, LPITEMIDLIST pidl, LPSTR buffer, int len)
 {
 	STRRET str;
 
@@ -703,7 +700,7 @@ HRESULT path_from_pidlA(IShellFolder* fo
 	return hr;
 }
 
-HRESULT path_from_pidlW(IShellFolder* folder, LPITEMIDLIST pidl, LPWSTR buffer, int len)
+static HRESULT path_from_pidlW(IShellFolder* folder, LPITEMIDLIST pidl, LPWSTR buffer, int len)
 {
 	STRRET str;
 
@@ -775,7 +772,7 @@ static LPITEMIDLIST get_to_absolute_pidl
 }
 
 
-HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl)
+static HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl)
 {
 	IExtractIcon* pExtract;
 
@@ -1553,7 +1550,7 @@ static void resize_frame_client(HWND hwn
 static HHOOK hcbthook;
 static ChildWnd* newchild = NULL;
 
-LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam)
+static LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam)
 {
 	if (code==HCBT_CREATEWND && newchild) {
 		ChildWnd* child = newchild;
@@ -1917,7 +1914,7 @@ static struct FullScreenParameters {
 	FALSE
 };
 
-void frame_get_clientspace(HWND hwnd, PRECT prect)
+static void frame_get_clientspace(HWND hwnd, PRECT prect)
 {
 	RECT rt;
 
@@ -2018,7 +2015,7 @@ static void toggle_child(HWND hwnd, UINT
 	resize_frame_client(hwnd);
 }
 
-BOOL activate_drive_window(LPCTSTR path)
+static BOOL activate_drive_window(LPCTSTR path)
 {
 	TCHAR drv1[_MAX_DRIVE], drv2[_MAX_DRIVE];
 	HWND child_wnd;
@@ -2046,7 +2043,7 @@ BOOL activate_drive_window(LPCTSTR path)
 	return FALSE;
 }
 
-BOOL activate_fs_window(LPCTSTR filesys)
+static BOOL activate_fs_window(LPCTSTR filesys)
 {
 	HWND child_wnd;
 
@@ -2069,7 +2066,7 @@ BOOL activate_fs_window(LPCTSTR filesys)
 	return FALSE;
 }
 
-LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
+static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 {
 	TCHAR b1[BUFFER_LEN], b2[BUFFER_LEN];
 
@@ -2755,7 +2752,7 @@ static void format_bytes(LPTSTR buffer, 
 		_stprintf(buffer, sLongNumFmt, bytes);
 }
 
-static void set_space_status()
+static void set_space_status(void)
 {
 	ULARGE_INTEGER ulFreeBytesToCaller, ulTotalBytes, ulFreeBytes;
 	TCHAR fmt[64], b1[64], b2[64], buffer[BUFFER_LEN];
@@ -3670,7 +3667,7 @@ static void refresh_child(ChildWnd* chil
 }
 
 
-static void create_drive_bar()
+static void create_drive_bar(void)
 {
 	TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0};
 #ifndef _NO_EXTENSIONS
@@ -3736,7 +3733,7 @@ static void create_drive_bar()
 	}
 }
 
-static void refresh_drives()
+static void refresh_drives(void)
 {
 	RECT rect;
 
@@ -3753,7 +3750,7 @@ static void refresh_drives()
 }
 
 
-BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow)
+static BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow)
 {
 	HINSTANCE hinst = ShellExecute(hwnd, NULL/*operation*/, cmd, NULL/*parameters*/, NULL/*dir*/, nCmdShow);
 
@@ -3766,7 +3763,7 @@ BOOL launch_file(HWND hwnd, LPCTSTR cmd,
 }
 
 #ifdef UNICODE
-BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow)
+static BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow)
 {
 	HINSTANCE hinst = ShellExecuteA(hwnd, NULL/*operation*/, cmd, NULL/*parameters*/, NULL/*dir*/, nCmdShow);
 
@@ -3780,7 +3777,7 @@ BOOL launch_fileA(HWND hwnd, LPSTR cmd, 
 #endif
 
 
-BOOL launch_entry(Entry* entry, HWND hwnd, UINT nCmdShow)
+static BOOL launch_entry(Entry* entry, HWND hwnd, UINT nCmdShow)
 {
 	TCHAR cmd[MAX_PATH];
 
@@ -3993,7 +3990,7 @@ static void CtxMenu_reset()
 	s_pctxmenu3 = NULL;
 }
 
-IContextMenu* CtxMenu_query_interfaces(IContextMenu* pcm1)
+static IContextMenu* CtxMenu_query_interfaces(IContextMenu* pcm1)
 {
 	IContextMenu* pcm = NULL;
 
@@ -4073,7 +4070,7 @@ static HRESULT ShellFolderContextMenu(IS
 }
 
 
-LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
+static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 {
 	ChildWnd* child = (ChildWnd*) GetWindowLong(hwnd, GWL_USERDATA);
 	ASSERT(child);
@@ -4455,7 +4452,7 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd,
 }
 
 
-LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
+static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 {
 	ChildWnd* child = (ChildWnd*) GetWindowLong(GetParent(hwnd), GWL_USERDATA);
 	Pane* pane = (Pane*) GetWindowLong(hwnd, GWL_USERDATA);
@@ -4583,7 +4580,7 @@ static void InitInstance(HINSTANCE hinst
 }
 
 
-void show_frame(HWND hwndParent, int cmdshow)
+static void show_frame(HWND hwndParent, int cmdshow)
 {
 	const static TCHAR sMDICLIENT[] = {'M','D','I','C','L','I','E','N','T','\0'};
 
@@ -4681,7 +4678,7 @@ void show_frame(HWND hwndParent, int cmd
 	UpdateWindow(Globals.hMainWnd);
 }
 
-void ExitInstance()
+static void ExitInstance(void)
 {
 #ifdef _SHELL_FOLDERS
 	(*Globals.iDesktop->lpVtbl->Release)(Globals.iDesktop);
@@ -4692,6 +4689,7 @@ void ExitInstance()
 	ImageList_Destroy(Globals.himl);
 }
 
+#ifdef _NO_EXTENSIONS
 
 /* search for already running win[e]files */
 
@@ -4712,7 +4710,7 @@ static BOOL CALLBACK EnumWndProc(HWND hw
 }
 
 /* search for window of given class name to allow only one running instance */
-int find_window_class(LPCTSTR classname)
+static int find_window_class(LPCTSTR classname)
 {
 	EnumWindows(EnumWndProc, (LPARAM)classname);
 
@@ -4722,8 +4720,9 @@ int find_window_class(LPCTSTR classname)
 	return 0;
 }
 
+#endif
 
-int winefile_main(HINSTANCE hinstance, HWND hwndParent, int cmdshow)
+static int winefile_main(HINSTANCE hinstance, HWND hwndParent, int cmdshow)
 {
 	MSG msg;
 
Index: programs/winefile/winefile.h
===================================================================
RCS file: /home/wine/wine/programs/winefile/winefile.h,v
retrieving revision 1.12
diff -u -p -r1.12 winefile.h
--- programs/winefile/winefile.h	5 Jun 2005 18:02:05 -0000	1.12
+++ programs/winefile/winefile.h	10 Jun 2005 11:03:27 -0000
@@ -144,6 +144,9 @@ typedef struct
 
 extern WINEFILE_GLOBALS Globals;
 
+extern void WineLicense(HWND hwnd);
+extern void WineWarranty(HWND hwnd);
+
 #ifdef __WINE__
 #ifdef UNICODE
 extern void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);


More information about the wine-patches mailing list