Changeset 21356 for trunk/src


Ignore:
Timestamp:
Feb 21, 2010, 5:33:53 PM (16 years ago)
Author:
rlwalsh
Message:

eliminate VACPP warning & info msgs - see Ticket #1

Location:
trunk/src/user32
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/callwrap.asm

    r10602 r21356  
    1919DGROUP  group BSS32, DATA32
    2020        assume  cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT
    21 
    22 DATA32  segment dword use32 public 'DATA'
    2321
    2422CODE32          SEGMENT DWORD PUBLIC USE32 'CODE'
  • trunk/src/user32/combo.c

    r10216 r21356  
    8585 * Load combo button bitmap.
    8686 */
    87 static BOOL COMBO_Init()
     87static BOOL COMBO_Init(void)
    8888{
    8989  HDC       hDC;
    9090
    9191  if( hComboBmp ) return TRUE;
    92   if( (hDC = CreateCompatibleDC(0)) )
     92  if( (hDC = CreateCompatibleDC(0)) != 0)
    9393  {
    9494    BOOL    bRet = FALSE;
    95     if( (hComboBmp = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_COMBO))) )
     95    if( (hComboBmp = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_COMBO))) != 0)
    9696    {
    9797      BITMAP      bm;
     
    676676        PATCOPY );
    677677
    678     if( (bBool = lphc->wState & CBF_BUTTONDOWN) )
     678    if( (bBool = lphc->wState & CBF_BUTTONDOWN) != FALSE)
    679679    {
    680680        DrawEdge( hdc, &rectButton, EDGE_SUNKEN, BF_RECT );
     
    750750   {
    751751        size = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, id, 0);
    752         if( (pText = HeapAlloc( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR))) )
     752        if( (pText = HeapAlloc( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR))) != NULL)
    753753    {
    754754            /* size from LB_GETTEXTLEN may be too large, from LB_GETTEXT is accurate */
     
    10941094       if( length )
    10951095       {
    1096        if( (pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR))) )
     1096       if( (pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR))) != NULL)
    10971097       {
    10981098        SendMessageW(lphc->hWndLBox, LB_GETTEXT,
     
    18971897      LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwnd, 0 );
    18981898
    1899       TRACE("[%04x]: msg %s wp %08x lp %08lx\n",
    1900             hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
     1899      TRACE("[%04x]: msg %s wp %08x lp %08lx\n", hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
    19011900
    19021901      if( lphc || message == WM_NCCREATE )
  • trunk/src/user32/controls.h

    r9523 r21356  
    8484
    8585extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
     86extern BOOL COMBO_RollupListbox( LPHEADCOMBO lphc);
    8687
    8788#endif // __CONTROLS_H
  • trunk/src/user32/edit.c

    r21308 r21356  
    720720            LPSTR textA = (LPSTR)lParam;
    721721            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    722             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     722            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    723723            MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    724724        }
     
    824824    case EM_SETTABSTOPS16:
    825825        DPRINTF_EDIT_MSG16("EM_SETTABSTOPS");
    826         result = (LRESULT)EDIT_EM_SetTabStops16(es, (INT)wParam, MapSL(lParam));
     826        result = (LRESULT)EDIT_EM_SetTabStops16(es, (INT)wParam, (LPINT16)MapSL(lParam));
    827827        break;
    828828    case EM_SETTABSTOPS:
     
    10591059            {
    10601060            INT countW = MultiByteToWideChar(CP_ACP, 0, nameA, -1, NULL, 0);
    1061             if((nameW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     1061            if((nameW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    10621062                MultiByteToWideChar(CP_ACP, 0, nameA, -1, nameW, countW);
    10631063            }
     
    22872287    if (es->hloc32W) {
    22882288        UINT alloc_size = ROUND_TO_GROW((size + 1) * sizeof(WCHAR));
    2289         if ((hNew32W = LocalReAlloc(es->hloc32W, alloc_size, LMEM_MOVEABLE | LMEM_ZEROINIT))) {
     2289        if ((hNew32W = LocalReAlloc(es->hloc32W, alloc_size, LMEM_MOVEABLE | LMEM_ZEROINIT)) != 0) {
    22902290        TRACE("Old 32 bit handle %08x, new handle %08x\n", es->hloc32W, hNew32W);
    22912291        es->hloc32W = hNew32W;
     
    23242324
    23252325    alloc_size = ROUND_TO_GROW((size + 1) * sizeof(WCHAR));
    2326     if ((es->undo_text = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, es->undo_text, alloc_size))) {
     2326    if ((es->undo_text = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, es->undo_text, alloc_size)) != 0) {
    23272327#ifdef __WIN32OS2__
    23282328        es->undo_buffer_size = alloc_size/sizeof(WCHAR) - 1;
     
    51905190
    51915191    OpenClipboard(hwnd);
    5192     if ((hsrc = GetClipboardData(CF_UNICODETEXT))) {
     5192    if ((hsrc = GetClipboardData(CF_UNICODETEXT)) != 0) {
    51935193        src = (LPWSTR)GlobalLock(hsrc);
    51945194        EDIT_EM_ReplaceSel(hwnd, es, TRUE, src, TRUE);
     
    52935293    LPCSTR textA = (LPCSTR)lParam;
    52945294    INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    5295     if((text = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     5295    if((text = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    52965296        MultiByteToWideChar(CP_ACP, 0, textA, -1, text, countW);
    52975297    }
  • trunk/src/user32/exticon.c

    r8049 r21356  
    204204        /* allocate the phony ICONDIR structure */
    205205        *uSize = lpcid->idCount * sizeof(CURSORICONDIRENTRY) + HEADER_SIZE;
    206         if( (lpID = (CURSORICONDIR*)HeapAlloc(GetProcessHeap(),0, *uSize) ))
     206        if( (lpID = (CURSORICONDIR*)HeapAlloc(GetProcessHeap(),0, *uSize) ) != NULL)
    207207        {
    208208          /* copy the header */
  • trunk/src/user32/listbox.c

    r21308 r21356  
    25102510    }
    25112511
    2512     TRACE("[%04x]: msg %s wp %08x lp %08lx\n",
    2513           hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
     2512    TRACE("[%04x]: msg %s wp %08x lp %08lx\n", hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
    25142513    switch(msg)
    25152514    {
     
    25342533            LPSTR textA = (LPSTR)lParam;
    25352534            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    2536             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     2535            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    25372536                MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    25382537        }
     
    25582557            LPSTR textA = (LPSTR)lParam;
    25592558            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    2560             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     2559            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    25612560                MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    25622561        }
     
    25802579            LPSTR textA = (LPSTR)lParam;
    25812580            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    2582             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     2581            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    25832582                MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    25842583        }
     
    27322731            LPSTR textA = (LPSTR)lParam;
    27332732            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    2734             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     2733            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    27352734                MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    27362735        }
     
    27552754            LPSTR textA = (LPSTR)lParam;
    27562755            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    2757             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     2756            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    27582757                MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    27592758        }
     
    27822781            LPSTR textA = (LPSTR)lParam;
    27832782            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    2784             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     2783            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    27852784                MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    27862785        }
     
    28812880            LPSTR textA = (LPSTR)lParam;
    28822881            INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0);
    2883             if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))))
     2882            if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL)
    28842883                MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW);
    28852884        }
     
    29042903
    29052904    case LB_SETTABSTOPS16:
    2906         return LISTBOX_SetTabStops( hwnd, descr, (INT)(INT16)wParam, MapSL(lParam), TRUE );
     2905        return LISTBOX_SetTabStops( hwnd, descr, (INT)(INT16)wParam, MapSL((LPINT)lParam), TRUE );
    29072906
    29082907    case LB_SETTABSTOPS:
     
    30753074    if( !descr->lphc )
    30763075        {
    3077             LPDRAGINFO16 dragInfo = MapSL( lParam );
     3076            LPDRAGINFO16 dragInfo = (LPDRAGINFO16)MapSL(lParam );
    30783077            dragInfo->l = LISTBOX_GetItemFromPoint( descr, dragInfo->pt.x,
    30793078                                                dragInfo->pt.y );
     
    31243123    LB_DESCR *descr = (LB_DESCR *)GetWindowLongA( hwnd, 0 );
    31253124
    3126     TRACE_(combo)("[%04x]: msg %s wp %08x lp %08lx\n",
    3127                   hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
     3125    TRACE_(combo)("[%04x]: msg %s wp %08x lp %08lx\n", hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
    31283126
    31293127    if( descr || msg == WM_CREATE )
  • trunk/src/user32/mdi.c

    r9523 r21356  
    12211221    {
    12221222        if (ci->frameTitle) HeapFree( GetProcessHeap(), 0, ci->frameTitle );
    1223         if ((ci->frameTitle = HeapAlloc( GetProcessHeap(), 0, (strlenW(lpTitle)+1)*sizeof(WCHAR))))
     1223        if ((ci->frameTitle = HeapAlloc( GetProcessHeap(), 0, (strlenW(lpTitle)+1)*sizeof(WCHAR))) != NULL)
    12241224            strcpyW( ci->frameTitle, lpTitle );
    12251225    }
     
    20462046    SetRectEmpty( &childRect );
    20472047
    2048     if ((list = WIN_ListChildren( hwnd )))
     2048    if ((list = WIN_ListChildren( hwnd )) != NULL)
    20492049    {
    20502050        int i;
  • trunk/src/user32/menu.c

    r10190 r21356  
    395395    HMENU hMenu;
    396396
    397     if ((hMenu = CreateMenu()))
     397    if ((hMenu = CreateMenu()) != 0)
    398398    {
    399399    POPUPMENU *menu = MENU_GetMenu(hMenu);
     
    411411            menu->items[0].fType = MF_SYSMENU | MF_POPUP;
    412412            menu->items[0].fState = 0;
    413             if ((menu = MENU_GetMenu(hPopupMenu))) menu->wFlags |= MF_SYSMENU;
     413            if ((menu = MENU_GetMenu(hPopupMenu)) != 0) menu->wFlags |= MF_SYSMENU;
    414414
    415415        TRACE("GetSysMenu hMenu=%04x (%04x)\n", hMenu, hPopupMenu );
     
    35733573    MENUITEM * lpmi;
    35743574
    3575     if (!(lpmi = MENU_FindItem(&hMenu,&nPos,MF_BYPOSITION))) return -1;
     3575    if (!(lpmi = MENU_FindItem(&hMenu,(UINT*)&nPos,MF_BYPOSITION))) return -1;
    35763576    if (lpmi->fType & MF_POPUP) return -1;
    35773577    return lpmi->wID;
     
    44134413    else if (unicode)
    44144414    {
    4415         if ((menu->text = HeapAlloc( GetProcessHeap(), 0, (strlenW(text)+1) * sizeof(WCHAR) )))
     4415        if ((menu->text = HeapAlloc( GetProcessHeap(), 0, (strlenW(text)+1) * sizeof(WCHAR) )) != NULL)
    44164416            strcpyW( menu->text, text );
    44174417    }
     
    44204420        LPCSTR str = (LPCSTR)text;
    44214421        int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
    4422         if ((menu->text = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
     4422        if ((menu->text = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )) != NULL)
    44234423            MultiByteToWideChar( CP_ACP, 0, str, -1, menu->text, len );
    44244424    }
     
    48174817    TRACE("(0x%04x 0x%08lx)\n", hMenu, dwContextHelpID);
    48184818
    4819     if ((menu = MENU_GetMenu(hMenu)))
     4819    if ((menu = MENU_GetMenu(hMenu)) != 0)
    48204820    {
    48214821    menu->dwContextHelpID = dwContextHelpID;
     
    48344834    TRACE("(0x%04x)\n", hMenu);
    48354835
    4836     if ((menu = MENU_GetMenu(hMenu)))
     4836    if ((menu = MENU_GetMenu(hMenu)) != 0)
    48374837    {
    48384838    return menu->dwContextHelpID;
  • trunk/src/user32/pmwindow.cpp

    r21348 r21356  
    155155// We make sure PM is up and running for our purposes and init the existing
    156156// thread 0.
    157 //******************************************************************************
     157//*******************************************************************************
    158158BOOL InitPM()
    159159{
     
    498498
    499499                    SetWin32TIB();
    500                     while(hwndEnum = WinGetNextWindow(henum))
     500                    while((hwndEnum = WinGetNextWindow(henum)) != 0)
    501501                    {
    502502                        WinQueryWindowProcess(hwndEnum, &pidTemp, NULL);
     
    20922092                henum = WinBeginEnumWindows(HWND_DESKTOP);
    20932093
    2094                 while(hwndEnum = WinGetNextWindow(henum))
     2094                while((hwndEnum = WinGetNextWindow(henum)) != 0)
    20952095                {
    20962096                    WinQueryWindowProcess(hwndEnum, &pidTemp, NULL);
  • trunk/src/user32/text.c

    r8754 r21356  
    470470       ret = DrawTextExW( hdc, wstr, wcount, rect, flags, NULL );
    471471       if (flags & DT_MODIFYSTRING)
    472             WideCharToMultiByte( CP_ACP, 0, wstr, -1, str, count, NULL, NULL );
     472            WideCharToMultiByte( CP_ACP, 0, wstr, -1, (LPSTR)str, count, NULL, NULL );
    473473       HeapFree(GetProcessHeap(), 0, wstr);
    474474   }
     
    530530            slen = strlen((LPCSTR)lp);
    531531        else
    532             slen = strlen(MapSL(lp));
     532            slen = strlen(MapSL((LPCSTR)lp));
    533533    }
    534534
     
    541541            GetTextExtentPoint32A(hdc, (LPCSTR)lp, slen, &s);
    542542        else
    543             GetTextExtentPoint32A(hdc, MapSL(lp), slen, &s);
     543            GetTextExtentPoint32A(hdc, MapSL((LPCSTR)lp), slen, &s);
    544544        if(cx == 0) cx = s.cx;
    545545        if(cy == 0) cy = s.cy;
     
    569569            TextOutA(memdc, 0, 0, (LPCSTR)lp, slen);
    570570        else
    571             TextOutA(memdc, 0, 0, MapSL(lp), slen);
     571            TextOutA(memdc, 0, 0, MapSL((LPCSTR)lp), slen);
    572572    }
    573573
  • trunk/src/user32/win32wbase.cpp

    r21344 r21356  
    337337            }
    338338            /* Make sure parent is valid */
    339             if (!window->IsWindow() )
     339/*RLW            if (!window->IsWindow() ) */
     340            if (!::IsWindow(cs->hwndParent) )
    340341            {
    341342                    RELEASE_WNDOBJ(window);
  • trunk/src/user32/win32wbasenonclient.cpp

    r10496 r21356  
    247247        DispatchMessageA(&msg);
    248248    }
    249     if (!IsWindow())
     249/*RLW    if (!IsWindow()) */
     250    if (::IsWindow(getWindowHandle()))
    250251    {
    251252      ReleaseCapture();
  • trunk/src/user32/win32wmisc.cpp

    r10119 r21356  
    6565        /* Now build the list of all windows */
    6666
    67         if ((list = (HWND *)HeapAlloc( GetProcessHeap(), 0, sizeof(HWND) * (count + 1))))
     67        if ((list = (HWND *)HeapAlloc( GetProcessHeap(), 0, sizeof(HWND) * (count + 1))) != NULL)
    6868        {
    6969            win32wnd = (Win32BaseWindow*)parent->getFirstChild();
  • trunk/src/user32/windlg.cpp

    r10431 r21356  
    649649    SendMessageA( listbox, combo ? CB_GETLBTEXT : LB_GETTEXT, item, (LPARAM)buffer );
    650650
    651     if ((ret = (buffer[0] == '[')))  /* drive or directory */
     651    if ((ret = (buffer[0] == '[')) != FALSE)  /* drive or directory */
    652652    {
    653653        if (buffer[1] == '-')  /* drive */
     
    701701        char *p, *p2;
    702702        p = spec;
    703         if ((p2 = strrchr( p, '\\' ))) p = p2;
    704         if ((p2 = strrchr( p, '/' ))) p = p2;
     703        if ((p2 = strrchr( p, '\\' )) != NULL) p = p2;
     704        if ((p2 = strrchr( p, '/' )) != NULL) p = p2;
    705705        if (p != spec)
    706706        {
     
    756756        /* Update the original file spec */
    757757        char *p = spec;
    758         while ((*orig_spec++ = *p++));
     758        while ((*orig_spec++ = *p++) != 0);
    759759    }
    760760
  • trunk/src/user32/winicon.cpp

    r9638 r21356  
    929929
    930930#ifdef __WIN32OS2__
    931     if( (hdc = CreateCompatibleDC( 0 )) )
     931    if( (hdc = CreateCompatibleDC( 0 )) != 0 )
    932932#else
    933933    if( (hdc = GetDC( 0 )) )
     
    948948
    949949        if ((pInfo = (BITMAPINFO *)HeapAlloc( GetProcessHeap(), 0,
    950                                               max(size, sizeof(BITMAPINFOHEADER) + 2*sizeof(RGBQUAD)))))
     950                                              max(size, sizeof(BITMAPINFOHEADER) + 2*sizeof(RGBQUAD)))) != NULL)
    951951        {
    952952            memcpy( pInfo, bmi, size );
     
    10171017                if (DoStretch)
    10181018                {
    1019                     if ((hAndBits = CreateBitmap(width, height, 1, 1, NULL)))
     1019                    if ((hAndBits = CreateBitmap(width, height, 1, 1, NULL)) != 0)
    10201020                    {
    10211021                        HBITMAP hOld;
  • trunk/src/user32/wndmsg.h

    r10431 r21356  
    2121void DebugPrintMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode, BOOL fInternalMsg);
    2222#else
     23#define GetMsgText(Msg)     ""
    2324#define DebugPrintMessage(a, b, c, d, e, f)
    2425#endif
Note: See TracChangeset for help on using the changeset viewer.