We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ffe399 + 915f251 commit ecc678dCopy full SHA for ecc678d
src/CMakeLists.txt
@@ -1,7 +1,4 @@
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
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
6
add_subdirectory(BlocksRuntime)
7
endif()
src/shims/yield.c
@@ -25,6 +25,11 @@ static void *
25
__DISPATCH_WAIT_FOR_ENQUEUER__(void **ptr)
26
{
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
+
33
void *value;
34
while ((value = os_atomic_load(ptr, relaxed)) == NULL) {
35
_dispatch_preemption_yield(++spins);
0 commit comments