mirror of
https://github.com/reactos/wine.git
synced 2024-12-14 07:08:41 +00:00
user32: Avoid double initialization.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6771fa22e9
commit
5b53c0b88b
@ -974,7 +974,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
|
||||
HMONITOR monitor;
|
||||
MONITORINFO mon_info;
|
||||
RECT rect,r;
|
||||
int nItems = 0;
|
||||
int nItems;
|
||||
int nDroppedHeight;
|
||||
|
||||
TRACE("[%p]: drop down\n", lphc->self);
|
||||
|
@ -1094,9 +1094,9 @@ static HCURSOR CURSORICON_CreateIconFromANI( const BYTE *bits, DWORD bits_size,
|
||||
struct cursoricon_object *info;
|
||||
DWORD *frame_rates = NULL;
|
||||
DWORD *frame_seq = NULL;
|
||||
ani_header header = {0};
|
||||
ani_header header;
|
||||
BOOL use_seq = FALSE;
|
||||
HCURSOR cursor = 0;
|
||||
HCURSOR cursor;
|
||||
UINT i;
|
||||
BOOL error = FALSE;
|
||||
HICON *frames;
|
||||
|
@ -97,7 +97,7 @@ HCONV WINAPI DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic,
|
||||
{
|
||||
HWND hwndClient;
|
||||
WDML_INSTANCE* pInstance;
|
||||
WDML_CONV* pConv = NULL;
|
||||
WDML_CONV* pConv;
|
||||
ATOM aSrv = 0, aTpc = 0;
|
||||
|
||||
TRACE("(0x%x,%p,%p,%p)\n", idInst, hszService, hszTopic, pCC);
|
||||
@ -1135,7 +1135,7 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS
|
||||
{
|
||||
WDML_CONV* pConv;
|
||||
WDML_XACT* pXAct;
|
||||
HDDEDATA hDdeData = 0;
|
||||
HDDEDATA hDdeData;
|
||||
|
||||
TRACE("(%p,%d,%p,%p,%x,%x,%d,%p)\n",
|
||||
pData, cbData, hConv, hszItem, wFmt, wType, dwTimeout, pdwResult);
|
||||
@ -1373,7 +1373,7 @@ static LRESULT CALLBACK WDML_ClientProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPA
|
||||
*/
|
||||
BOOL WINAPI DdeDisconnect(HCONV hConv)
|
||||
{
|
||||
WDML_CONV* pConv = NULL;
|
||||
WDML_CONV* pConv;
|
||||
WDML_XACT* pXAct;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
|
@ -1881,7 +1881,7 @@ static void WDML_RemoveAllLinks(WDML_INSTANCE* pInstance, WDML_CONV* pConv, WDML
|
||||
WDML_LINK* WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
|
||||
HSZ hszItem, BOOL use_fmt, UINT uFmt)
|
||||
{
|
||||
WDML_LINK* pCurrent = NULL;
|
||||
WDML_LINK* pCurrent;
|
||||
|
||||
for (pCurrent = pInstance->links[side]; pCurrent != NULL; pCurrent = pCurrent->next)
|
||||
{
|
||||
@ -2061,7 +2061,7 @@ WDML_CONV* WDML_AddConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
|
||||
WDML_CONV* WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
|
||||
HSZ hszService, HSZ hszTopic)
|
||||
{
|
||||
WDML_CONV* pCurrent = NULL;
|
||||
WDML_CONV* pCurrent;
|
||||
|
||||
for (pCurrent = pInstance->convs[side]; pCurrent != NULL; pCurrent = pCurrent->next)
|
||||
{
|
||||
|
@ -60,12 +60,12 @@ static LRESULT CALLBACK WDML_ServerConvProc(HWND, UINT, WPARAM, LPARAM);
|
||||
*/
|
||||
BOOL WINAPI DdePostAdvise(DWORD idInst, HSZ hszTopic, HSZ hszItem)
|
||||
{
|
||||
WDML_INSTANCE* pInstance = NULL;
|
||||
WDML_LINK* pLink = NULL;
|
||||
HDDEDATA hDdeData = 0;
|
||||
HGLOBAL hItemData = 0;
|
||||
WDML_CONV* pConv = NULL;
|
||||
ATOM atom = 0;
|
||||
WDML_INSTANCE* pInstance;
|
||||
WDML_LINK* pLink;
|
||||
HDDEDATA hDdeData;
|
||||
HGLOBAL hItemData;
|
||||
WDML_CONV* pConv;
|
||||
ATOM atom;
|
||||
UINT count;
|
||||
|
||||
TRACE("(%d,%p,%p)\n", idInst, hszTopic, hszItem);
|
||||
@ -378,7 +378,7 @@ static LRESULT CALLBACK WDML_ServerNameProc(HWND hwndServer, UINT iMsg, WPARAM w
|
||||
{
|
||||
HWND hwndClient;
|
||||
HSZ hszApp, hszTop;
|
||||
HDDEDATA hDdeData = 0;
|
||||
HDDEDATA hDdeData;
|
||||
WDML_INSTANCE* pInstance;
|
||||
UINT_PTR uiLo, uiHi;
|
||||
|
||||
|
@ -489,7 +489,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||
POINT pos;
|
||||
SIZE size;
|
||||
DLG_TEMPLATE template;
|
||||
DIALOGINFO * dlgInfo = NULL;
|
||||
DIALOGINFO * dlgInfo;
|
||||
DWORD units = GetDialogBaseUnits();
|
||||
BOOL ownerEnabled = TRUE;
|
||||
HMENU hMenu = 0;
|
||||
@ -917,7 +917,7 @@ INT_PTR WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance, LPCDLGTEMPLATEW temp
|
||||
*/
|
||||
BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval )
|
||||
{
|
||||
BOOL wasEnabled = TRUE;
|
||||
BOOL wasEnabled;
|
||||
DIALOGINFO * dlgInfo;
|
||||
HWND owner;
|
||||
|
||||
|
@ -498,7 +498,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
|
||||
LINEDEF *current_line;
|
||||
LINEDEF *previous_line;
|
||||
LINEDEF *start_line;
|
||||
INT line_index = 0, nstart_line = 0, nstart_index = 0;
|
||||
INT line_index = 0, nstart_line, nstart_index;
|
||||
INT line_count = es->line_count;
|
||||
INT orig_net_length;
|
||||
RECT rc;
|
||||
@ -1079,7 +1079,7 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
|
||||
INT x = 0;
|
||||
INT y = 0;
|
||||
INT w;
|
||||
INT lw = 0;
|
||||
INT lw;
|
||||
LINEDEF *line_def;
|
||||
|
||||
index = min(index, len);
|
||||
@ -4299,7 +4299,7 @@ static LRESULT EDIT_EM_GetThumb(EDITSTATE *es)
|
||||
static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es)
|
||||
{
|
||||
LONG buflen;
|
||||
LPWSTR lpCompStr = NULL;
|
||||
LPWSTR lpCompStr;
|
||||
LPSTR lpCompStrAttr = NULL;
|
||||
DWORD dwBufLenAttr;
|
||||
|
||||
@ -4342,8 +4342,6 @@ static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es)
|
||||
dwBufLenAttr);
|
||||
lpCompStrAttr[dwBufLenAttr] = 0;
|
||||
}
|
||||
else
|
||||
lpCompStrAttr = NULL;
|
||||
}
|
||||
|
||||
/* check for change in composition start */
|
||||
|
@ -475,7 +475,7 @@ LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL uni
|
||||
{
|
||||
struct user_thread_info *thread_info = get_user_thread_info();
|
||||
struct hook_info info;
|
||||
DWORD_PTR ret = 0;
|
||||
DWORD_PTR ret;
|
||||
|
||||
USER_CheckNotLock();
|
||||
|
||||
|
@ -135,7 +135,7 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
|
||||
{
|
||||
RECT rect;
|
||||
HFONT hPrevFont;
|
||||
HBRUSH hBrush = 0;
|
||||
HBRUSH hBrush;
|
||||
COLORREF textColor = 0;
|
||||
|
||||
if( bActive )
|
||||
|
@ -835,7 +835,7 @@ static inline INT LISTBOX_lstrcmpiW( LCID lcid, LPCWSTR str1, LPCWSTR str2 )
|
||||
*/
|
||||
static INT LISTBOX_FindStringPos( LB_DESCR *descr, LPCWSTR str, BOOL exact )
|
||||
{
|
||||
INT index, min, max, res = -1;
|
||||
INT index, min, max, res;
|
||||
|
||||
if (!(descr->style & LBS_SORT)) return -1; /* Add it at the end */
|
||||
min = 0;
|
||||
@ -878,7 +878,7 @@ static INT LISTBOX_FindStringPos( LB_DESCR *descr, LPCWSTR str, BOOL exact )
|
||||
*/
|
||||
static INT LISTBOX_FindFileStrPos( LB_DESCR *descr, LPCWSTR str )
|
||||
{
|
||||
INT min, max, res = -1;
|
||||
INT min, max, res;
|
||||
|
||||
if (!HAS_STRINGS(descr))
|
||||
return LISTBOX_FindStringPos( descr, str, FALSE );
|
||||
|
@ -838,7 +838,7 @@ static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam )
|
||||
static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
|
||||
{
|
||||
HMENU menu = GetMenu( frame );
|
||||
HMENU hSysPopup = 0;
|
||||
HMENU hSysPopup;
|
||||
HBITMAP hSysMenuBitmap = 0;
|
||||
HICON hIcon;
|
||||
|
||||
|
@ -1742,7 +1742,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||
*/
|
||||
static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
|
||||
{
|
||||
HBRUSH hPrevBrush = 0, brush = GetSysColorBrush( COLOR_MENU );
|
||||
HBRUSH hPrevBrush, brush = GetSysColorBrush( COLOR_MENU );
|
||||
RECT rect;
|
||||
POPUPMENU *menu = MENU_GetMenu( hmenu );
|
||||
|
||||
|
@ -1996,7 +1996,7 @@ static BOOL post_dde_message( struct packed_message *data, const struct send_mes
|
||||
void* ptr = NULL;
|
||||
int size = 0;
|
||||
UINT_PTR uiLo, uiHi;
|
||||
LPARAM lp = 0;
|
||||
LPARAM lp;
|
||||
HGLOBAL hunlock = 0;
|
||||
int i;
|
||||
DWORD res;
|
||||
|
@ -71,7 +71,7 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
||||
int bspace, bw, bh, theight, tleft, wwidth, wheight, wleft, wtop, bpos;
|
||||
int borheight, borwidth, iheight, ileft, iwidth, twidth, tiheight;
|
||||
NONCLIENTMETRICSW nclm;
|
||||
HMONITOR monitor = 0;
|
||||
HMONITOR monitor;
|
||||
MONITORINFO mon_info;
|
||||
LPCWSTR lpszText;
|
||||
WCHAR *buffer = NULL;
|
||||
|
@ -1220,7 +1220,7 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
|
||||
else /* need to build a list of the region rectangles */
|
||||
{
|
||||
DWORD size;
|
||||
RGNDATA *data = NULL;
|
||||
RGNDATA *data;
|
||||
|
||||
if (!(size = GetRegionData( hrgn, 0, NULL ))) return FALSE;
|
||||
if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return FALSE;
|
||||
|
@ -536,7 +536,7 @@ static BOOL get_base_keys( enum parameter_key index, HKEY *base_key, HKEY *volat
|
||||
/* load a value to a registry entry */
|
||||
static DWORD load_entry( struct sysparam_entry *entry, void *data, DWORD size )
|
||||
{
|
||||
DWORD type, count = 0;
|
||||
DWORD type, count;
|
||||
HKEY base_key, volatile_key;
|
||||
|
||||
if (!get_base_keys( entry->regval[0], &base_key, &volatile_key )) return FALSE;
|
||||
|
@ -1214,7 +1214,7 @@ static BOOL TEXT_GrayString(HDC hdc, HBRUSH hb, GRAYSTRINGPROC fn, LPARAM lp, IN
|
||||
HFONT hfsave;
|
||||
HDC memdc;
|
||||
int slen = len;
|
||||
BOOL retval = TRUE;
|
||||
BOOL retval;
|
||||
COLORREF fg, bg;
|
||||
|
||||
if(!hdc) return FALSE;
|
||||
|
@ -354,7 +354,7 @@ static HWND *list_window_parents( HWND hwnd )
|
||||
{
|
||||
WND *win;
|
||||
HWND current, *list;
|
||||
int i, pos = 0, size = 16, count = 0;
|
||||
int i, pos = 0, size = 16, count;
|
||||
|
||||
if (!(list = HeapAlloc( GetProcessHeap(), 0, size * sizeof(HWND) ))) return NULL;
|
||||
|
||||
@ -1911,7 +1911,7 @@ BOOL WINAPI OpenIcon( HWND hwnd )
|
||||
*/
|
||||
HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR title )
|
||||
{
|
||||
HWND *list = NULL;
|
||||
HWND *list;
|
||||
HWND retvalue = 0;
|
||||
int i = 0, len = 0;
|
||||
WCHAR *buffer = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user