Changeset 1533


Ignore:
Timestamp:
May 30, 2010, 7:34:46 PM (15 years ago)
Author:
Gregg Young
Message:

Fixed possible loss of precision compiler warnings by casting the variables in question.

Location:
trunk/dll
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dirsize.c

    r1505 r1533  
    331331  if (pci) {
    332332
    333     float fltPct = 0.0;
     333    float fltPct = (float) 0.0;
    334334    CHAR szCurDir[80];
    335335    CHAR szSubDir[80];
     
    356356                            sizeof(FSALLOCATE));
    357357        if (!rc) {
    358           fltPct = (ullTotalBytes * 100.0) /
    359             ((float)fsa.cUnit * (fsa.cSectorUnit * fsa.cbSector));
     358          fltPct = (float) (ullTotalBytes * 100.0) /
     359            ((float)fsa.cUnit *  (fsa.cSectorUnit * fsa.cbSector));
    360360        }
    361361        // Need unique buffer 23 Jul 07 SHL
     
    363363      }
    364364      else
    365         fltPct = (((float)pci->cbFile + pci->easize) * 100.0) / ullTotalBytes;
     365        fltPct = (float) (((float)pci->cbFile + pci->easize) * 100.0) / ullTotalBytes;
    366366
    367367      //Second line for graph reworked 03 AUG 08 GKY
  • trunk/dll/draglist.c

    r1521 r1533  
    330330          pDImg->sizlStretch.cx = 32;
    331331          pDImg->sizlStretch.cy = 32;
    332           pDImg->cxOffset = -16 + (ulNumfiles * 4);
    333           pDImg->cyOffset = 0 + (ulNumfiles * 7);
     332          pDImg->cxOffset = -16 + ((SHORT) ulNumfiles * 4);
     333          pDImg->cyOffset = 0 + ((SHORT) ulNumfiles * 7);
    334334          ulNumIcon = ulNumfiles + 1;
    335335        }
     
    357357        pDImg->sizlStretch.cx = 32;
    358358        pDImg->sizlStretch.cy = 32;
    359         pDImg->cxOffset = -16 + (ulNumfiles * 3);
    360         pDImg->cyOffset = 0 + (ulNumfiles * 6);
     359        pDImg->cxOffset = -16 + ((SHORT) ulNumfiles * 3);
     360        pDImg->cyOffset = 0 + ((SHORT) ulNumfiles * 6);
    361361      }
    362362      pDItem->hwndItem = (hwndObj) ? hwndObj : hwndCnr;
     
    660660          pDImg->sizlStretch.cx = 32;
    661661          pDImg->sizlStretch.cy = 32;
    662           pDImg->cxOffset = -16 + (ulNumfiles * 4);
    663           pDImg->cyOffset = 0 + (ulNumfiles * 7);
     662          pDImg->cxOffset = -16 + ((SHORT) ulNumfiles * 4);
     663          pDImg->cyOffset = 0 + ((SHORT) ulNumfiles * 7);
    664664          ulNumIcon = ulNumfiles + 1;
    665665        }
     
    685685        pDImg->sizlStretch.cx = 32;
    686686        pDImg->sizlStretch.cy = 32;
    687         pDImg->cxOffset = -16 + (ulNumfiles * 3);
    688         pDImg->cyOffset = 0 + (ulNumfiles * 6);
     687        pDImg->cxOffset = -16 + ((SHORT) ulNumfiles * 3);
     688        pDImg->cyOffset = 0 + ((SHORT) ulNumfiles * 6);
    689689      }
    690690      pDItem->hwndItem = (hwndObj) ? hwndObj : hwnd;
  • trunk/dll/excputil.c

    r1442 r1533  
    247247    else {
    248248      is32Bit = FALSE;
    249       u.stk16.usIP = pContext->ctx_RegEip;
    250       u.stk16.usBP = pContext->ctx_RegEbp;
     249      u.stk16.usIP = (SHORT) pContext->ctx_RegEip;
     250      u.stk16.usBP = (SHORT) pContext->ctx_RegEbp;
    251251    }
    252252
  • trunk/dll/info.c

    r1498 r1533  
    252252
    253253              percentfree = (fsa.cUnitAvail && fsa.cUnit) ?
    254                 (fsa.cUnitAvail * 100) / fsa.cUnit : 0;
     254                ((USHORT) fsa.cUnitAvail * 100) / (USHORT) fsa.cUnit : 0;
    255255              if (!percentfree && fsa.cUnitAvail)
    256256                percentfree = 1;
  • trunk/dll/mainwnd.c

    r1506 r1533  
    19671967      *szDrv = 0;
    19681968      x = id - IDM_DRIVEA;
    1969       *szDrv = x + 'A';
     1969      *szDrv = (CHAR) x + 'A';
    19701970      strcpy(szDrv + 1, ":");
    19711971      if (x > 1) {
     
    36653665              WinSetWindowUShort(hwndChild,
    36663666                                 QWS_XRESTORE,
    3667                                  (USHORT) (ulWidth * ulCurCol) + Rectl.xLeft);
     3667                                 (USHORT) ((USHORT) ulWidth * (USHORT) ulCurCol)
     3668                                 + (USHORT) Rectl.xLeft);
    36683669              WinSetWindowUShort(hwndChild,
    36693670                                 QWS_YRESTORE,
     
    37543755          WinSetWindowPos(hwndChild, HWND_TOP, 0, 0, 0, 0,
    37553756                          SWP_SIZE | SWP_MOVE | SWP_FOCUSDEACTIVATE);
    3756           WinSetWindowUShort(hwndChild, QWS_XRESTORE, ux);
    3757           WinSetWindowUShort(hwndChild, QWS_YRESTORE, uy);
    3758           WinSetWindowUShort(hwndChild, QWS_CXRESTORE, ucx);
    3759           WinSetWindowUShort(hwndChild, QWS_CYRESTORE, ucy);
     3757          WinSetWindowUShort(hwndChild, QWS_XRESTORE, (USHORT) ux);
     3758          WinSetWindowUShort(hwndChild, QWS_YRESTORE, (USHORT) uy);
     3759          WinSetWindowUShort(hwndChild, QWS_CXRESTORE, (USHORT) ucx);
     3760          WinSetWindowUShort(hwndChild, QWS_CYRESTORE, (USHORT) ucy);
    37603761        }
    37613762        else {
     
    37633764          WinSetWindowPos(hwndChild, HWND_TOP, swp.x, swp.y, swp.cx, swp.cy,
    37643765                          SWP_MOVE | SWP_SIZE | SWP_SHOW);
    3765           WinSetWindowUShort(hwndChild, QWS_XRESTORE, ux);
    3766           WinSetWindowUShort(hwndChild, QWS_YRESTORE, uy);
    3767           WinSetWindowUShort(hwndChild, QWS_CXRESTORE, ucx);
    3768           WinSetWindowUShort(hwndChild, QWS_CYRESTORE, ucy);
     3766          WinSetWindowUShort(hwndChild, QWS_XRESTORE, (USHORT) ux);
     3767          WinSetWindowUShort(hwndChild, QWS_YRESTORE, (USHORT) uy);
     3768          WinSetWindowUShort(hwndChild, QWS_CXRESTORE, (USHORT) ucx);
     3769          WinSetWindowUShort(hwndChild, QWS_CYRESTORE, (USHORT) ucy);
    37693770        }
    37703771      }
  • trunk/dll/misc.c

    r1505 r1533  
    13551355                  (((info->HotKeyID - IDM_COMMANDNUM0) % 10) + 1) == 10 ? 0 :
    13561356                   ((info->HotKeyID - IDM_COMMANDNUM0) % 10) + 1);
    1357         mi.id = info->ID;
     1357        mi.id = (USHORT) info->ID;
    13581358        mi.afAttribute = (info->flags & ONCE ? MIA_CHECKED : 0) |
    13591359                         (info->flags & PROMPT ? MIA_FRAMED : 0);
  • trunk/dll/newview.c

    r1498 r1533  
    22932293          WinSendMsg(hwnd, WM_VSCROLL, MPFROM2SHORT(FID_VERTSCROLL, 0),
    22942294                     MPFROM2SHORT(0, SB_LINEUP));
    2295           pts.y = (Rectl.yTop - Rectl.yBottom) - 1;
     2295          pts.y = (SHORT) (Rectl.yTop - Rectl.yBottom) - 1;
    22962296          outofwindow = TRUE;
    22972297        }
  • trunk/dll/seeall.c

    r1498 r1533  
    31803180          WinSendMsg(hwnd, WM_VSCROLL, MPFROM2SHORT(FID_VERTSCROLL, 0),
    31813181                     MPFROM2SHORT(0, SB_LINEUP));
    3182           pts.y = (Rectl.yTop - Rectl.yBottom) - 1;
     3182          pts.y = (SHORT) (Rectl.yTop - Rectl.yBottom) - 1;
    31833183          outofwindow = TRUE;
    31843184        }
  • trunk/dll/systemf.c

    r1505 r1533  
    11971197      sdata.Environment = (PBYTE)pszEnvironment;
    11981198      sdata.InheritOpt = SSF_INHERTOPT_PARENT;
    1199       sdata.SessionType = ulAppType;
     1199      sdata.SessionType = (USHORT) ulAppType;
    12001200      sdata.ObjectBuffer = szObject;
    12011201      sdata.ObjectBuffLen = sizeof(szObject);
  • trunk/dll/treecnr.c

    r1513 r1533  
    657657        ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE);
    658658        PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID);
    659         dcd->suspendview = tempsusp;
     659        dcd->suspendview = (USHORT) tempsusp;
    660660        fFollowTree = tempfollow;
    661661        if (mp2)
     
    701701      ExpandAll(dcd->hwndCnr,
    702702                (SHORT1FROMMP(mp1) == IDM_EXPAND), (PCNRITEM) mp2);
    703       dcd->suspendview = tempsusp;
     703      dcd->suspendview = (USHORT) tempsusp;
    704704      PostMsg(dcd->hwndCnr, UM_FILTER, MPVOID, MPVOID);
    705705    }
     
    23292329      dcd->mask.attrFile |= FILE_DIRECTORY;
    23302330      WinSendMsg(hwnd, CM_FILTER, MPFROMP(Filter), MPFROMP(&dcd->mask));
    2331       dcd->suspendview = tempsusp;
     2331      dcd->suspendview = (USHORT) tempsusp;
    23322332      PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
    23332333      //DbgMsg(pszSrcFile, __LINE__, "UM_RESCAN %p pci %s", hwnd, (CHAR *) mp1);
Note: See TracChangeset for help on using the changeset viewer.