Changeset 1782


Ignore:
Timestamp:
Jun 28, 2014, 11:34:01 PM (11 years ago)
Author:
Gregg Young
Message:

Addition code issues found based on cppcheck warnings

Location:
trunk/dll
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1780 r1782  
    16591659
    16601660      WaitChild = xmallocz(sizeof(WAITCHILD), pszSrcFile, __LINE__);
    1661       WaitChild->pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
    16621661      if (!WaitChild)
    16631662        return 0;
     1663      WaitChild->pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
    16641664      if (s) {
    16651665        if (!dcd->info->extract) {
  • trunk/dll/filter.c

    r1566 r1782  
    2121  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
    2222  31 May 11 SHL Rework Filter() for speed
     23  28 Jun 14 GKY Fix errors identified with CPPCheck;
    2324
    2425***********************************************************************/
     
    458459          WinSendDlgItemMsg(hwnd, MSK_TEXT,
    459460                            EM_SETSEL, MPFROM2SHORT(0, 256), MPVOID);
    460         }
    461       }
    462       *mask->szText = 0;
     461        }
     462        *mask->szText = 0;
     463      }
    463464    }
    464465    WinShowWindow(hwnd, TRUE);
  • trunk/dll/mainwnd2.c

    r1778 r1782  
    4242                never being posted
    4343  12 Aug 12 GKY Allow for selection of include subdirectories or a list file on initial startup of compare dirs
     44  28 Jun 14 GKY Fix errors identified with CPPCheck;
    4445
    4546***********************************************************************/
     
    973974        }
    974975      }
    975     }
    976     // 2014-06-11 SHL Initialize view, sort and filter button text
    977     if (pd->hwndDir1) {
    978       hwndC = WinWindowFromID(pd->hwndDir1, FID_CLIENT);
    979       if (hwndC) {
    980         dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER);
    981         if (dcd && dcd->hwndCnr)
    982           PostMsg(dcd->hwndCnr, UM_SETUP2, MPVOID, MPVOID);
    983       }
    984     }
    985     if (pd->hwndDir2) {
    986       hwndC = WinWindowFromID(pd->hwndDir2, FID_CLIENT);
    987       if (hwndC) {
    988         dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER);
    989         if (dcd && dcd->hwndCnr)
    990           PostMsg(dcd->hwndCnr, UM_SETUP2, MPVOID, MPVOID);
    991       }
    992     }
    993 
    994     which = 0;
    995     size = sizeof(ULONG);
    996     if (PrfQueryProfileData(fmprof,
    997                             realappname,
    998                             "FM/4 Max",
    999                             (PVOID)&which,
    1000                             &size) &&
    1001         size == sizeof(ULONG) &&
    1002         which)
    1003     {
    1004       PostMsg(hwnd,
    1005               UM_MAXIMIZE,
    1006               MPFROMLONG(((which == 1) ?
    1007                           pd->hwndDir1 : pd->hwndDir2)), MPVOID);
    1008     }
    1009     PostMsg(hwnd, UM_SIZE, MPVOID, MPVOID);
    1010     if (!hwndTree)
    1011       PostMsg(hwnd, UM_BUILDDRIVEBAR, MPVOID, MPVOID);
    1012     load_tools(NULL);
    1013     PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
    1014     fRunning = TRUE;
     976    //}
     977      // 2014-06-11 SHL Initialize view, sort and filter button text
     978      if (pd->hwndDir1) {
     979        hwndC = WinWindowFromID(pd->hwndDir1, FID_CLIENT);
     980        if (hwndC) {
     981          dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER);
     982          if (dcd && dcd->hwndCnr)
     983            PostMsg(dcd->hwndCnr, UM_SETUP2, MPVOID, MPVOID);
     984        }
     985      }
     986      if (pd->hwndDir2) {
     987        hwndC = WinWindowFromID(pd->hwndDir2, FID_CLIENT);
     988        if (hwndC) {
     989          dcd = WinQueryWindowPtr(WinWindowFromID(hwndC, DIR_CNR), QWL_USER);
     990          if (dcd && dcd->hwndCnr)
     991            PostMsg(dcd->hwndCnr, UM_SETUP2, MPVOID, MPVOID);
     992        }
     993      }
     994 
     995      which = 0;
     996      size = sizeof(ULONG);
     997      if (PrfQueryProfileData(fmprof,
     998                              realappname,
     999                              "FM/4 Max",
     1000                              (PVOID)&which,
     1001                              &size) &&
     1002          size == sizeof(ULONG) &&
     1003          which)
     1004      {
     1005        PostMsg(hwnd,
     1006                UM_MAXIMIZE,
     1007                MPFROMLONG(((which == 1) ?
     1008                            pd->hwndDir1 : pd->hwndDir2)), MPVOID);
     1009      }
     1010      PostMsg(hwnd, UM_SIZE, MPVOID, MPVOID);
     1011      if (!hwndTree)
     1012        PostMsg(hwnd, UM_BUILDDRIVEBAR, MPVOID, MPVOID);
     1013      load_tools(NULL);
     1014      PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID);
     1015      fRunning = TRUE;
     1016    } //if pd
    10151017    return 0;
    10161018
  • trunk/dll/pathutil.c

    r1761 r1782  
    2222                So calls to these functions had to be changed.
    2323  21 Mar 14 SHL Add IsAbsolutePath
     24  28 Jun 14 GKY Fix errors identified with CPPCheck;
    2425
    2526***********************************************************************/
     
    263264    }
    264265    // if it doesn't have an extension try it with all the standard ones and add if found
    265     else if (szCmdLine && (!strchr(szCmdLine, '.') ||
    266                            strrchr(szCmdLine, '.' ) < strrchr(szCmdLine, '\\'))) {
     266    else if (!strchr(szCmdLine, '.') ||
     267             strrchr(szCmdLine, '.' ) < strrchr(szCmdLine, '\\')) {
    267268      if (!strchr(szCmdLine, ' ')) {
    268269        // strip quotes readded by BuildQuotedFileName
  • trunk/dll/shadow.c

    r1673 r1782  
    1616  12 Jul 09 GKY Add xDosQueryAppType and xDosAlloc... to allow FM/2 to load in high memory
    1717  17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     18  28 Jun 14 GKY Fix errors identified with CPPCheck;
    1819
    1920***********************************************************************/
     
    112113  if (obj) {
    113114    sprintf(s2,
    114             "%s%s%sOBJECTID=<FM2_%s>",
     115            "%s%s%s%sOBJECTID=<FM2_%s>",
    115116            objtitle,
    116117            (p == type[1]) ? "ICONFILE=" : NullStr,
Note: See TracChangeset for help on using the changeset viewer.