VirtualBox

Ignore:
Timestamp:
Jan 18, 2022 11:24:43 AM (3 years ago)
Author:
vboxsync
Message:

IPRT: VC++ 19.2 update 11 build adjustments. bugref:8489

Location:
trunk/src/VBox/Runtime/common/checksum
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/checksum/RTSha1Digest.cpp

    r93115 r93301  
    5858
    5959    /* Buffer size for progress callback */
    60     double rdMulti = 100.0 / (cbBuf ? cbBuf : 1);
     60    double rdMulti = 100.0 / (cbBuf ? (double)cbBuf : 1.0);
    6161
    6262    /* Working buffer */
     
    7575        if (pfnProgressCallback)
    7676        {
    77             rc = pfnProgressCallback((unsigned)(cbReadTotal * rdMulti), pvUser);
     77            rc = pfnProgressCallback((unsigned)((double)cbReadTotal * rdMulti), pvUser);
    7878            if (RT_FAILURE(rc))
    7979                break; /* canceled */
     
    120120
    121121    /* Fetch the file size. Only needed if there is a progress callback. */
    122     double rdMulti = 0;
     122    double rdMulti = 0.0;
    123123    if (pfnProgressCallback)
    124124    {
     
    130130            return rc;
    131131        }
    132         rdMulti = 100.0 / (cbFile ? cbFile : 1);
     132        rdMulti = 100.0 / (cbFile ? (double)cbFile : 1.0);
    133133    }
    134134
     
    161161        if (pfnProgressCallback)
    162162        {
    163             rc = pfnProgressCallback((unsigned)(cbReadTotal * rdMulti), pvUser);
     163            rc = pfnProgressCallback((unsigned)((double)cbReadTotal * rdMulti), pvUser);
    164164            if (RT_FAILURE(rc))
    165165                break; /* canceled */
  • trunk/src/VBox/Runtime/common/checksum/RTSha256Digest.cpp

    r93115 r93301  
    5858
    5959    /* Buffer size for progress callback */
    60     double rdMulti = 100.0 / (cbBuf ? cbBuf : 1);
     60    double rdMulti = 100.0 / (cbBuf ? (double)cbBuf : 1);
    6161
    6262    /* Working buffer */
     
    7575        if (pfnProgressCallback)
    7676        {
    77             rc = pfnProgressCallback((unsigned)(cbReadTotal * rdMulti), pvUser);
     77            rc = pfnProgressCallback((unsigned)((double)cbReadTotal * rdMulti), pvUser);
    7878            if (RT_FAILURE(rc))
    7979                break; /* canceled */
     
    124124
    125125    /* Fetch the file size. Only needed if there is a progress callback. */
    126     double rdMulti = 0;
     126    double rdMulti = 0.0;
    127127    if (pfnProgressCallback)
    128128    {
     
    134134            return rc;
    135135        }
    136         rdMulti = 100.0 / (cbFile ? cbFile : 1);
     136        rdMulti = 100.0 / (cbFile ? (double)cbFile : 1.0);
    137137    }
    138138
     
    161161        if (pfnProgressCallback)
    162162        {
    163             rc = pfnProgressCallback((unsigned)(cbReadTotal * rdMulti), pvUser);
     163            rc = pfnProgressCallback((unsigned)((double)cbReadTotal * rdMulti), pvUser);
    164164            if (RT_FAILURE(rc))
    165165                break; /* canceled */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette