File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11
2- # Remove once underlying clang warning is fixed (rdar://93596069)
3- set_source_files_properties (shims/yield.c PROPERTIES COMPILE_FLAGS -Wno-error=unused-but-set-variable )
4-
52if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
63 add_subdirectory (BlocksRuntime)
74endif ()
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ static void *
2525__DISPATCH_WAIT_FOR_ENQUEUER__ (void * * ptr )
2626{
2727 int spins = 0 ;
28+ // Different platforms may expand `_dispatch_preemption_yield` to a
29+ // no-op, but `(void)++spins` is not considered a use like
30+ // `(void)spins` is. Add a use to avoid unused var warnings.
31+ (void )spins ;
32+
2833 void * value ;
2934 while ((value = os_atomic_load (ptr , relaxed )) == NULL ) {
3035 _dispatch_preemption_yield (++ spins );
You can’t perform that action at this time.
0 commit comments