Fix more warnings.

This commit is contained in:
Mike McCormack 2005-06-10 19:32:24 +00:00 committed by Alexandre Julliard
parent 71404a7372
commit 5f409c7d5b
5 changed files with 35 additions and 33 deletions

View File

@ -159,7 +159,7 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType,
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:

View File

@ -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 hDlg, int nXDifference, int nYDifference,
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);
}

View File

@ -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;

View File

@ -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* 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;
@ -703,7 +700,7 @@ HRESULT path_from_pidlA(IShellFolder* folder, LPITEMIDLIST pidl, LPSTR buffer, i
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(Entry* entry, HWND hwnd)
}
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 hwnd)
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 cmd, HWND hchild)
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, LONGLONG bytes)
_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* child)
}
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, UINT nCmdShow)
}
#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, UINT nCmdShow)
#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(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);
ASSERT(child);
@ -4455,7 +4452,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);
Pane* pane = (Pane*) GetWindowLong(hwnd, GWL_USERDATA);
@ -4583,7 +4580,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'};
@ -4681,7 +4678,7 @@ void show_frame(HWND hwndParent, int cmdshow)
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 hwnd, LPARAM lparam)
}
/* 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;

View File

@ -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);