From 0c622af8470ada80a4c5b03c0a3a4d2317e7ac24 Mon Sep 17 00:00:00 2001 From: Ben Barham Date: Fri, 27 May 2022 16:52:25 -0700 Subject: [PATCH] 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. --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index adc989d42..c5412ce59 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,7 @@ +# Remove once underlying clang warning is fixed (rdar://93596069) +set_source_files_properties(shims/yield.c PROPERTIES COMPILE_FLAGS -Wno-error=unused-but-set-variable) + if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) add_subdirectory(BlocksRuntime) endif()