File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
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
-
5
2
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
6
3
add_subdirectory (BlocksRuntime)
7
4
endif ()
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ static void *
25
25
__DISPATCH_WAIT_FOR_ENQUEUER__ (void * * ptr )
26
26
{
27
27
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
+
28
33
void * value ;
29
34
while ((value = os_atomic_load (ptr , relaxed )) == NULL ) {
30
35
_dispatch_preemption_yield (++ spins );
You can’t perform that action at this time.
0 commit comments