VirtualBox

Changeset 101657 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Oct 30, 2023 1:17:13 PM (15 months ago)
Author:
vboxsync
Message:

Runtime/uri.cpp: Make it build on linux.arm64 with -Werror, bugref:10541

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/uri.cpp

    r98103 r101657  
    7373 *  delims  = '<' , '>' , '#' , '%' , '"'
    7474 *  unwise  = '{' , '}' , '|' , '\' , '^' , '[' , ']' , '`'
     75 *
     76 * @note ARM defines char as unsigned by default in the AAPCS(64) so the first check would trigger
     77 *       a compiler warning/error. Apple decided to ignore that and declares char a signed like on
     78 *       the other platforms.
    7579 */
    76 #define URI_EXCLUDED(a) \
     80#if    defined(RT_OS_LINUX) \
     81    && (defined(RT_ARCH_ARM64) || defined(RT_ARCH_ARM32))
     82# define URI_EXCLUDED(a) \
     83  (   ((a) <= 0x20) \
     84   || ((a) >= 0x5B && (a) <= 0x5E) \
     85   || ((a) >= 0x7B && (a) <= 0x7D) \
     86   || (a) == '<' || (a) == '>' || (a) == '#' \
     87   || (a) == '%' || (a) == '"' || (a) == '`' )
     88#else
     89# define URI_EXCLUDED(a) \
    7790  (   ((a) >= 0x0  && (a) <= 0x20) \
    7891   || ((a) >= 0x5B && (a) <= 0x5E) \
     
    8093   || (a) == '<' || (a) == '>' || (a) == '#' \
    8194   || (a) == '%' || (a) == '"' || (a) == '`' )
     95#endif
    8296
    8397static char *rtUriPercentEncodeN(const char *pszString, size_t cchMax)
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