VirtualBox

Changeset 77111 in vbox


Ignore:
Timestamp:
Feb 1, 2019 11:01:12 AM (6 years ago)
Author:
vboxsync
Message:

RTErrConvertFromErrno(): Convert the uNativeCode parameter from unsigned to int. errno is specified to be of type int and while it should only ever contain positive values RTErrConvertFromErrno() is also used inside the various kernel drivers where errno does not exist and the return code might be negative as well. The example here is ERESTART (-1) on FreeBSD causing a compile error with clang and this fix is cleaner IMO instead of casting ERSTART to unsigned. [build fix]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp

    r77110 r77111  
    450450#endif
    451451        default:
    452             AssertLogRelMsgFailed(("Unhandled error code %d\n", uNativeCode));
     452            AssertLogRelMsgFailed(("Unhandled error code %d\n", iNativeCode));
    453453            return VERR_UNRESOLVED_ERROR;
    454454    }
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