Repository navigation
fix(native-core): silence unused block parameter warnings in macOS FocusZone - #4365
Closed
Saad Najmi (Saadnajmi) wants to merge 1 commit into
Closed
Saad Najmi (Saadnajmi) wants to merge 1 commit into
Saad Najmi (Saadnajmi) wants to merge 1 commit into
Conversation
…cusZone 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
4 of 10 tasks
Collaborator
Author
|
Folded into #4364, which now includes this change and its changeset. |
Contributor
Bundle size reportTree-shaken, minified production esbuild bundles with React and React Native runtimes externalized.
The job is advisory: size changes are reported but do not fail the pull request. Bundle or analysis errors still fail. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Platforms Impacted
Description of changes
The block passed to
indexOfObjectPassingTest:in-[RCTFocusZone nextViewToFocusInHierarchyForAction:]never reads itsindexorstopparameters, so clang reports-Wunused-parameterfor both. Builds that treat that warning as an error, such as Office's macOS build, fail to compileRCTFocusZone.m.packages/agentic/native-core/macos/components/FocusZone/shared/RCTFocusZone.m: mark both parameters__unused. No behavior change; this is the only copy of the block onmain..changeset/native-core-focuszone-unused-params.md: patch changeset for@fluentui-react-native/native-core.Verification
Compiled the exact block from
RCTFocusZone.m(before and after this change) inside a stub function with Xcode 26.4.1:xcrun clang -fsyntax-only -fobjc-arc -Wall -Wextra -Wunused-parameter -Werror repro.munused parameter 'index'andunused parameter 'stop'[-Werror,-Wunused-parameter]Not run locally: a full macOS app build and
yarn change:check(CI runs the changeset check).Pull request checklist
This PR has considered (when applicable):