swift-lang/unusedvariable.patch

35 lines
1.6 KiB
Diff

diff --color -Naur swift-corelibs-libdispatch-orig/src/BlocksRuntime/runtime.c swift-corelibs-libdispatch/src/BlocksRuntime/runtime.c
--- swift-corelibs-libdispatch-orig/src/BlocksRuntime/runtime.c 2020-08-14 16:49:59.000000000 -0500
+++ swift-corelibs-libdispatch/src/BlocksRuntime/runtime.c 2021-09-17 18:40:21.684025320 -0500
@@ -479,6 +479,7 @@
return; // stack or GC or global
}
refcount = byref->flags & BLOCK_REFCOUNT_MASK;
+ (void)refcount;
os_assert(refcount);
if (latching_decr_int_should_deallocate(&byref->flags)) {
if (byref->flags & BLOCK_BYREF_HAS_COPY_DISPOSE) {
diff --color -Naur swift-corelibs-libdispatch-orig/tests/bsdtestharness.c swift-corelibs-libdispatch/tests/bsdtestharness.c
--- swift-corelibs-libdispatch-orig/tests/bsdtestharness.c 2020-08-14 16:49:59.000000000 -0500
+++ swift-corelibs-libdispatch/tests/bsdtestharness.c 2021-09-17 18:39:05.679434477 -0500
@@ -152,6 +152,7 @@
assert(pid > 0);
#if defined(__linux__)
+ (void)to;
int status;
struct rusage usage;
struct timeval tv_stop, tv_wall;
diff --color -Naur swift-corelibs-libdispatch-orig/tests/dispatch_apply.c swift-corelibs-libdispatch/tests/dispatch_apply.c
--- swift-corelibs-libdispatch-orig/tests/dispatch_apply.c 2020-08-14 16:49:59.000000000 -0500
+++ swift-corelibs-libdispatch/tests/dispatch_apply.c 2021-09-17 23:38:38.107488681 -0500
@@ -56,7 +56,8 @@
(void)ignored;
/* prevent i and j been optimized out */
volatile uint64_t i = 0, j = 0;
-
+ (void)i;
+ (void)j;
OSAtomicIncrement32(&busy_threads_started);
while(!all_done)