From 9ff3217bb0711df9a7b8aa9c1f59e7f944bc4707 Mon Sep 17 00:00:00 2001 From: vayne Date: Wed, 6 Sep 2006 17:44:41 +0000 Subject: ISO C90 warnings fixes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19724 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/win32/dialogs.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'Gui/win32/dialogs.c') diff --git a/Gui/win32/dialogs.c b/Gui/win32/dialogs.c index 59f45a5fc0..8a977a3b13 100644 --- a/Gui/win32/dialogs.c +++ b/Gui/win32/dialogs.c @@ -374,11 +374,12 @@ LRESULT CALLBACK SubUrlWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lPara void display_openurlwindow(gui_t *gui, int add) { - if(add) addurl = 1; HWND hWnd; HINSTANCE hInstance = GetModuleHandle(NULL); WNDCLASS wc; int x, y; + + if(add) addurl = 1; if(FindWindow(NULL, "MPlayer - Open URL...")) return; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = OpenUrlWndProc; @@ -632,16 +633,16 @@ void update_playlistwindow(void) void display_playlistwindow(gui_t *gui) { HWND hWnd = FindWindow(NULL, "MPlayer Playlist"); + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + if (hWnd) { SendMessage(hWnd, WM_CLOSE, 0, 0); return; } - HINSTANCE hInstance = GetModuleHandle(NULL); - WNDCLASS wc; - int x, y; - wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = PlayListWndProc; wc.cbClsExtra = 0; @@ -683,6 +684,9 @@ static LRESULT CALLBACK SkinBrowserWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, { case WM_CREATE: { + HANDLE skinHandle = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA finddata; + listbox = CreateWindow("listbox", NULL, WS_CHILD | WS_VISIBLE | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | WS_TABSTOP, @@ -695,9 +699,6 @@ static LRESULT CALLBACK SkinBrowserWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, /* This opens the skins directory, lists the directory names, and adds them to the listbox */ sprintf(skinspath, "%s/*.", get_path("skins")); - HANDLE skinHandle = INVALID_HANDLE_VALUE; - WIN32_FIND_DATA finddata; - skinHandle = FindFirstFile(skinspath, &finddata); if (skinHandle != INVALID_HANDLE_VALUE) { @@ -753,16 +754,16 @@ static LRESULT CALLBACK SkinBrowserWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, void display_skinbrowser(gui_t* gui) { HWND hWnd = FindWindow(NULL, "Skin Browser"); + HINSTANCE hInstance = GetModuleHandle(NULL); + WNDCLASS wc; + int x, y; + if (hWnd) { SendMessage(hWnd, WM_CLOSE, 0, 0); return; } - HINSTANCE hInstance = GetModuleHandle(NULL); - WNDCLASS wc; - int x, y; - wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = SkinBrowserWndProc; wc.cbClsExtra = 0; @@ -1106,12 +1107,12 @@ static LRESULT CALLBACK EqWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lP void display_eqwindow(gui_t *gui) { - if(!guiIntfStruct.sh_video) return; - HWND hWnd; HINSTANCE hInstance = GetModuleHandle(NULL); WNDCLASS wc; int x, y; + + if(!guiIntfStruct.sh_video) return; if(FindWindow(NULL, "MPlayer - Equalizer")) return; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = EqWndProc; -- cgit v1.2.3