VirtualBox

Ignore:
Timestamp:
Mar 26, 2021 12:29:59 PM (4 years ago)
Author:
vboxsync
Message:

Some small Solaris-specific build warning fixes:

include/iprt/x86.h: Undefine MSR_IA32_FLUSH_CMD to avoid warning about
'"MSR_IA32_FLUSH_CMD" redefined' when compiling SUPLibLdr.cpp.
SUPLibLdr.cpp includes <stdlib.h> which ultimately pulls in
<sys/controlregs.h> which has its own definition of MSR_IA32_FLUSH_CMD.

Additions/solaris/SharedFolders: Updated a handful of function prototypes
under SharedFolders/solaris10 which don't take any arguments to be
explicitly declared as 'function(void)' to silence gcc warnings from
-Wstrict-prototypes.

Main/src-server/solaris: Fixed two places where -Wconversion identified
possible alteration of the value due to different sized types.

RDP/client: Addressed an incorrect conversion descriptor type passed to
iconv(3C) in utils.c:utils_locale_to_utf8() (corresponding to unresolved
upstream issue #387 (https://github.com/rdesktop/rdesktop/issues/387).
Tidied up some inconsistent iconv(3C) argument type usage: the use of
-DUSE_LEGACY_PROTOTYPES requires -DICONV_CONST=const. Fixed some
incorrect strncpy()/strcat() calls using the corresponding code from
upstream.

Location:
trunk/src/VBox/Main/src-server/solaris
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp

    r83794 r88297  
    6363     */
    6464    int cbInstance = 0;
    65     int cbIface = strlen(pszIfaceName);
     65    size_t cbIface = strlen(pszIfaceName);
    6666    const char *pszEnd = pszIfaceName + cbIface - 1;
    67     for (int i = 0; i < cbIface - 1; i++)
     67    for (size_t i = 0; i < cbIface - 1; i++)
    6868    {
    6969        if (!RT_C_IS_DIGIT(*pszEnd))
     
    333333     */
    334334    int cbInstance = 0;
    335     int cbIface = strlen(szIfaceName);
     335    size_t cbIface = strlen(szIfaceName);
    336336    const char *pszEnd = pszIface + cbIface - 1;
    337     for (int i = 0; i < cbIface - 1; i++)
     337    for (size_t i = 0; i < cbIface - 1; i++)
    338338    {
    339339        if (!RT_C_IS_DIGIT(*pszEnd))
  • trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp

    r82968 r88297  
    336336     */
    337337    int cbInstance = 0;
    338     int cbIface = strlen(pszIfaceName);
     338    size_t cbIface = strlen(pszIfaceName);
    339339    const char *pszEnd = pszIfaceName + cbIface - 1;
    340     for (int i = 0; i < cbIface - 1; i++)
     340    for (size_t i = 0; i < cbIface - 1; i++)
    341341    {
    342342        if (!RT_C_IS_DIGIT(*pszEnd))
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