Patch from WineHQ:

Mike McCormack <mike@codeweavers.com>
Fix more warnings.

svn path=/trunk/; revision=15851
This commit is contained in:
Martin Fuchs 2005-06-10 20:41:26 +00:00
parent 15e83c5e04
commit d92ffc0b93
2 changed files with 30 additions and 28 deletions

View file

@ -154,9 +154,6 @@ typedef struct {
} ChildWnd; } ChildWnd;
extern void WineLicense(HWND hwnd);
extern void WineWarranty(HWND hwnd);
#ifdef __WINE__ #ifdef __WINE__
@ -211,9 +208,9 @@ static void refresh_drives();
static void get_path(Entry* dir, PTSTR path); static void get_path(Entry* dir, PTSTR path);
static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols); static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols);
LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); static 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 TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
/* globals */ /* globals */
@ -723,7 +720,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; STRRET str;
@ -739,7 +736,7 @@ HRESULT name_from_pidl(IShellFolder* folder, LPITEMIDLIST pidl, LPTSTR buffer, i
} }
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; STRRET str;
@ -755,7 +752,7 @@ HRESULT path_from_pidlA(IShellFolder* folder, LPITEMIDLIST pidl, LPSTR buffer, i
return hr; 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; STRRET str;
@ -827,7 +824,7 @@ static LPITEMIDLIST get_to_absolute_pidl(Entry* entry, HWND hwnd)
} }
HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl) static HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl)
{ {
IExtractIcon* pExtract; IExtractIcon* pExtract;
@ -1606,7 +1603,7 @@ static void resize_frame_client(HWND hwnd)
static HHOOK hcbthook; static HHOOK hcbthook;
static ChildWnd* newchild = NULL; 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) { if (code==HCBT_CREATEWND && newchild) {
ChildWnd* child = newchild; ChildWnd* child = newchild;
@ -1971,7 +1968,7 @@ static struct FullScreenParameters {
FALSE FALSE
}; };
void frame_get_clientspace(HWND hwnd, PRECT prect) static void frame_get_clientspace(HWND hwnd, PRECT prect)
{ {
RECT rt; RECT rt;
@ -2072,7 +2069,7 @@ static void toggle_child(HWND hwnd, UINT cmd, HWND hchild)
resize_frame_client(hwnd); resize_frame_client(hwnd);
} }
BOOL activate_drive_window(LPCTSTR path) static BOOL activate_drive_window(LPCTSTR path)
{ {
TCHAR drv1[_MAX_DRIVE], drv2[_MAX_DRIVE]; TCHAR drv1[_MAX_DRIVE], drv2[_MAX_DRIVE];
HWND child_wnd; HWND child_wnd;
@ -2100,7 +2097,7 @@ BOOL activate_drive_window(LPCTSTR path)
return FALSE; return FALSE;
} }
BOOL activate_fs_window(LPCTSTR filesys) static BOOL activate_fs_window(LPCTSTR filesys)
{ {
HWND child_wnd; HWND child_wnd;
@ -2123,7 +2120,7 @@ BOOL activate_fs_window(LPCTSTR filesys)
return FALSE; 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]; TCHAR b1[BUFFER_LEN], b2[BUFFER_LEN];
@ -2821,7 +2818,7 @@ static void format_bytes(LPTSTR buffer, LONGLONG bytes)
_stprintf(buffer, sLongNumFmt, bytes); _stprintf(buffer, sLongNumFmt, bytes);
} }
static void set_space_status() static void set_space_status(void)
{ {
ULARGE_INTEGER ulFreeBytesToCaller, ulTotalBytes, ulFreeBytes; ULARGE_INTEGER ulFreeBytesToCaller, ulTotalBytes, ulFreeBytes;
TCHAR fmt[64], b1[64], b2[64], buffer[BUFFER_LEN]; TCHAR fmt[64], b1[64], b2[64], buffer[BUFFER_LEN];
@ -3743,7 +3740,7 @@ static void refresh_child(ChildWnd* child)
} }
static void create_drive_bar() static void create_drive_bar(void)
{ {
TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}; TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0};
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
@ -3809,7 +3806,7 @@ static void create_drive_bar()
} }
} }
static void refresh_drives() static void refresh_drives(void)
{ {
RECT rect; RECT rect;
@ -3826,7 +3823,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); HINSTANCE hinst = ShellExecute(hwnd, NULL/*operation*/, cmd, NULL/*parameters*/, NULL/*dir*/, nCmdShow);
@ -3839,7 +3836,7 @@ BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow)
} }
#ifdef UNICODE #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); HINSTANCE hinst = ShellExecuteA(hwnd, NULL/*operation*/, cmd, NULL/*parameters*/, NULL/*dir*/, nCmdShow);
@ -3853,7 +3850,7 @@ BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow)
#endif #endif
BOOL launch_entry(Entry* entry, HWND hwnd, UINT nCmdShow) static BOOL launch_entry(Entry* entry, HWND hwnd, UINT nCmdShow)
{ {
TCHAR cmd[MAX_PATH]; TCHAR cmd[MAX_PATH];
@ -4072,7 +4069,7 @@ static void CtxMenu_reset()
#endif #endif
} }
IContextMenu* CtxMenu_query_interfaces(IContextMenu* pcm1) static IContextMenu* CtxMenu_query_interfaces(IContextMenu* pcm1)
{ {
IContextMenu* pcm = NULL; IContextMenu* pcm = NULL;
@ -4158,7 +4155,7 @@ static HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParen
} }
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); ChildWnd* child = (ChildWnd*) GetWindowLong(hwnd, GWL_USERDATA);
ASSERT(child); ASSERT(child);
@ -4542,7 +4539,7 @@ 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 TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
{ {
ChildWnd* child = (ChildWnd*) GetWindowLong(GetParent(hwnd), GWL_USERDATA); ChildWnd* child = (ChildWnd*) GetWindowLong(GetParent(hwnd), GWL_USERDATA);
Pane* pane = (Pane*) GetWindowLong(hwnd, GWL_USERDATA); Pane* pane = (Pane*) GetWindowLong(hwnd, GWL_USERDATA);
@ -4670,7 +4667,7 @@ static void InitInstance(HINSTANCE hinstance)
} }
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'}; const static TCHAR sMDICLIENT[] = {'M','D','I','C','L','I','E','N','T','\0'};
@ -4768,7 +4765,7 @@ void show_frame(HWND hwndParent, int cmdshow)
UpdateWindow(Globals.hMainWnd); UpdateWindow(Globals.hMainWnd);
} }
void ExitInstance() static void ExitInstance(void)
{ {
#ifdef _SHELL_FOLDERS #ifdef _SHELL_FOLDERS
(*Globals.iDesktop->lpVtbl->Release)(Globals.iDesktop); (*Globals.iDesktop->lpVtbl->Release)(Globals.iDesktop);
@ -4779,6 +4776,7 @@ void ExitInstance()
ImageList_Destroy(Globals.himl); ImageList_Destroy(Globals.himl);
} }
#ifdef _NO_EXTENSIONS
/* search for already running win[e]files */ /* search for already running win[e]files */
@ -4799,7 +4797,7 @@ static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam)
} }
/* search for window of given class name to allow only one running instance */ /* 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); EnumWindows(EnumWndProc, (LPARAM)classname);
@ -4809,8 +4807,9 @@ int find_window_class(LPCTSTR classname)
return 0; return 0;
} }
#endif
int winefile_main(HINSTANCE hinstance, HWND hwndParent, int cmdshow) static int winefile_main(HINSTANCE hinstance, HWND hwndParent, int cmdshow)
{ {
MSG msg; MSG msg;

View file

@ -145,6 +145,9 @@ typedef struct
extern WINEFILE_GLOBALS Globals; extern WINEFILE_GLOBALS Globals;
#ifdef __WINE__ #ifdef __WINE__
extern void WineLicense(HWND hwnd);
extern void WineWarranty(HWND hwnd);
#ifdef UNICODE #ifdef UNICODE
extern void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext); extern void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);
#else #else