Skip to content

Commit 1ac148b

Browse files
committed
Temporarily disable unused-but-set-variable until it's fixed in Clang
`_dispatch_preemption_yield(++spins)` expands to `(void)++spins;` on various platforms. A recent Clang change updated the `unused-but-set-variable` warning to skip counting operators as a use, but it ignores `(void)`. Disable the error until that's fixed.
1 parent da9271b commit 1ac148b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
# Remove once underlying clang warning is fixed (rdar://93596069)
3+
set_source_files_properties(shims/yield.c PROPERTIES $<$<C_COMPILER_ID:Clang>:-Wno-error=unused-but-set-variable>)
4+
25
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
36
add_subdirectory(BlocksRuntime)
47
endif()

0 commit comments

Comments
 (0)