user-agent-ios icon indicating copy to clipboard operation
user-agent-ios copied to clipboard

Fix Deprecation Build Warnings ⚠️

Open winsmith opened this issue 5 years ago • 1 comments

The class GCDReadWriteLock in ReadWriteLock.swift throws deprecation warnings, specifically:

'OSAtomicCompareAndSwap32Barrier' was deprecated in iOS 10.0: Use atomic_compare_exchange_strong() from <stdatomic.h> instead

winsmith avatar Aug 08 '19 09:08 winsmith

I tried unsuccessfully for a while to fix this. I can fix the "Use os_unfair_lock_lock instead" warning, since os_unfair_lock_lock is actually available, but I can't seem to import and reference atomic_compare_exchange_strong from the standard library or stdatomic.h.

This seems to be a known issue: https://openradar.appspot.com/27161329

My recommendation is to leave this ticket open, wait a bit, and see if this works once we increase the build target.

winsmith avatar Aug 08 '19 14:08 winsmith