VirtualBox

Changeset 102997 in vbox for trunk


Ignore:
Timestamp:
Jan 23, 2024 10:10:13 AM (9 months ago)
Author:
vboxsync
Message:

IPRT: Shut up some deprecated function warnings with macOS SDK 13.

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

Legend:

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

    r99775 r102997  
    979979
    980980
    981 /** the data store for stream two. */
     981/** The data store for stream two. */
    982982static char g_szStream2[10240];
    983983static unsigned volatile g_offStream2 = 0;
     
    10111011    va_list va;
    10121012    va_start(va, pszFormat);
     1013#if 1
     1014    int cch = vsnprintf(&g_szStream2[offStream2], sizeof(g_szStream2) - offStream2, pszFormat, va);
     1015#else
    10131016    int cch = vsprintf(&g_szStream2[offStream2], pszFormat, va);
     1017#endif
    10141018    va_end(va);
    10151019    offStream2 += cch;
  • trunk/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp

    r100108 r102997  
    4646#include <iprt/file.h>
    4747
    48 /* HACK ALERT! Shut up those deprecated messages on SecKeychainSearchCreateFromAttributes and SecKeychainSearchCopyNext. */
     48
     49/* HACK ALERT! Shut up those deprecated messages on SecKeychainSearchCreateFromAttributes and SecKeychainSearchCopyNext
     50   with older SDKs version (newer requires RT_GCC_NO_WARN_DEPRECATED_BEGIN). */
    4951#include <CoreFoundation/CoreFoundation.h>
    5052#undef  DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
    5153#define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
     54
     55/* The SecKeychainCopyDomainSearchList and others API are also deprecated since 10.0.
     56   See https://developer.apple.com/documentation/technotes/tn3137-on-mac-keychains for some info.
     57   We use RT_GCC_NO_WARN_DEPRECATED_BEGIN to silence these. */
    5258
    5359#include <Security/Security.h>
     
    205211     */
    206212    CFArrayRef hKeychains;
     213    RT_GCC_NO_WARN_DEPRECATED_BEGIN
    207214    OSStatus orc = SecKeychainCopyDomainSearchList(enmDomain, &hKeychains);
     215    RT_GCC_NO_WARN_DEPRECATED_END
    208216    if (orc == noErr)
    209217    {
     
    212220        {
    213221            SecKeychainRef hKeychain = (SecKeychainRef)CFArrayGetValueAtIndex(hKeychains, i);
     222            RT_GCC_NO_WARN_DEPRECATED_BEGIN
    214223            Assert(CFGetTypeID(hKeychain) == SecKeychainGetTypeID());
     224            RT_GCC_NO_WARN_DEPRECATED_END
    215225            CFRetain(hKeychain);
    216226
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