From 8bcfd0943aa86611789136eac1723207250dc21e Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 13 Oct 2026 21:09:31 -0700 Subject: [PATCH] fix(native-core): silence unused block parameter warnings in macOS FocusZone Mark the unused `index` and `stop` parameters of the indexOfObjectPassingTest: block in RCTFocusZone.m as `__unused` so the file compiles cleanly when -Wunused-parameter is treated as an error. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d7aea072-fc8e-4a8d-890a-81311025130d --- .changeset/native-core-focuszone-unused-params.md | 5 +++++ .../macos/components/FocusZone/shared/RCTFocusZone.m | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/native-core-focuszone-unused-params.md diff --git a/.changeset/native-core-focuszone-unused-params.md b/.changeset/native-core-focuszone-unused-params.md new file mode 100644 index 0000000000..9de68dfd60 --- /dev/null +++ b/.changeset/native-core-focuszone-unused-params.md @@ -0,0 +1,5 @@ +--- +"@fluentui-react-native/native-core": patch +--- + +Mark the unused block parameters in the macOS FocusZone traversal as `__unused` so the file compiles cleanly with `-Wunused-parameter` treated as an error. diff --git a/packages/agentic/native-core/macos/components/FocusZone/shared/RCTFocusZone.m b/packages/agentic/native-core/macos/components/FocusZone/shared/RCTFocusZone.m index e358255384..007b90399d 100644 --- a/packages/agentic/native-core/macos/components/FocusZone/shared/RCTFocusZone.m +++ b/packages/agentic/native-core/macos/components/FocusZone/shared/RCTFocusZone.m @@ -560,7 +560,7 @@ - (NSView *)nextViewToFocusInHierarchyForAction:(FocusZoneAction)action AppendFocusableViewsWithin(self, focusableViews); NSView *firstResponder = GetFirstResponder([self window]); - NSUInteger currentIndex = [focusableViews indexOfObjectPassingTest:^BOOL(NSView *candidateView, NSUInteger index, BOOL *stop) { + NSUInteger currentIndex = [focusableViews indexOfObjectPassingTest:^BOOL(NSView *candidateView, __unused NSUInteger index, __unused BOOL *stop) { return candidateView == firstResponder || [candidateView isDescendantOf:firstResponder] || [firstResponder isDescendantOf:candidateView];