VirtualBox

Ignore:
Timestamp:
Jul 6, 2020 5:17:30 PM (5 years ago)
Author:
vboxsync
Message:

IPRT/string: Stop using the 'register' keyword as Clang warns in C++11 mode. bugref:9790

Location:
trunk/src/VBox/Runtime/common/string
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/memchr.cpp

    r82968 r85075  
    5151#endif
    5252{
    53     register uint8_t const *pu8 = (uint8_t const *)pv;
    54     register size_t cb2 = cb;
     53    uint8_t const *pu8 = (uint8_t const *)pv;
     54    size_t cb2 = cb;
    5555    while (cb2-- > 0)
    5656    {
  • trunk/src/VBox/Runtime/common/string/memcmp.cpp

    r82968 r85075  
    5454#endif
    5555{
    56     register union
     56    union
    5757    {
    5858        uint8_t const  *pu8;
     
    6464
    6565    /* 32-bit word compare. */
    66     register size_t c = cb >> 2;
     66    size_t c = cb >> 2;
    6767    while (c-- > 0)
    6868    {
    6969        /* ASSUMES int is at least 32-bit! */
    70         register int32_t iDiff = *uDst.pu32++ - *uSrc.pu32++;
     70        int32_t iDiff = *uDst.pu32++ - *uSrc.pu32++;
    7171        if (iDiff)
    7272            return iDiff;
     
    7777    while (c-- > 0)
    7878    {
    79         register int8_t iDiff = *uDst.pu8++ - *uSrc.pu8++;
     79        int8_t iDiff = *uDst.pu8++ - *uSrc.pu8++;
    8080        if (iDiff)
    8181            return iDiff;
  • trunk/src/VBox/Runtime/common/string/memcpy.cpp

    r82968 r85075  
    5050#endif
    5151{
    52     register union
     52    union
    5353    {
    5454        uint8_t  *pu8;
     
    5858    uTrg.pv = pvDst;
    5959
    60     register union
     60    union
    6161    {
    6262        uint8_t const  *pu8;
     
    6767
    6868    /* 32-bit word moves. */
    69     register size_t c = cb >> 2;
     69    size_t c = cb >> 2;
    7070    while (c-- > 0)
    7171        *uTrg.pu32++ = *uSrc.pu32++;
  • trunk/src/VBox/Runtime/common/string/memset.cpp

    r82968 r85075  
    5050#endif
    5151{
    52     register union
     52    union
    5353    {
    5454        uint8_t  *pu8;
     
    5959
    6060    /* 32-bit word moves. */
    61     register uint32_t u32 = ch | (ch << 8);
     61    uint32_t u32 = ch | (ch << 8);
    6262    u32 |= u32 << 16;
    63     register size_t c = cb >> 2;
     63    size_t c = cb >> 2;
    6464    while (c-- > 0)
    6565        *u.pu32++ = u32;
  • trunk/src/VBox/Runtime/common/string/strcpy.cpp

    r82968 r85075  
    3939 * @param   pszSrc      Zero terminated string.
    4040 */
    41 char* strcpy(char *pszDst, register const char *pszSrc)
     41char* strcpy(char *pszDst, const char *pszSrc)
    4242{
    43     register char *psz = pszDst;
     43    char *psz = pszDst;
    4444    while ((*psz++ = *pszSrc++))
    4545        ;
  • trunk/src/VBox/Runtime/common/string/strlen.cpp

    r82968 r85075  
    4848#endif
    4949{
    50     register const char *psz = pszString;
     50    const char *psz = pszString;
    5151    while (*psz)
    5252        psz++;
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