-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compilation warnings related to YogaShadowNode #38781
Closed
Closed
Conversation
This file contains 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
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
p: Facebook
Partner: Facebook
Partner
fb-exported
labels
Aug 4, 2023
This pull request was exported from Phabricator. Differential Revision: D48059620 |
rshest
added a commit
to rshest/react-native
that referenced
this pull request
Aug 4, 2023
Summary: Pull Request resolved: facebook#38781 ## Changelog: [Internal] - These pop up when compiling with `/Wall`, fixes two legitimate warnings around using YogaShadowNode/Props in RN. The `suggestedIndex` in `ShadowNode::replaceChild` (and the overriden one in `YogaLayoutableShadowNode`) is used in a way around the code that suggests that it **is** expected to be negative (checking for non-negativity, assigning -1 as default etc), so having it as a `size_t` type argument both makes things confusing and generates the warning. I believe it's a good idea to be consistent and use the same type for the index throughout. In majority of the cases it's `int32_t` as of now. Differential Revision: D48059620 fbshipit-source-id: 2973a518acd7674ab25fad265d61eec5308bd1e2
rshest
force-pushed
the
export-D48059620
branch
from
August 4, 2023 08:15
0b2c23e
to
7c3532a
Compare
This pull request was exported from Phabricator. Differential Revision: D48059620 |
Base commit: 3901688 |
Summary: Pull Request resolved: facebook#38781 ## Changelog: [Internal] - These pop up when compiling with `/Wall`, fixes two legitimate warnings around using YogaShadowNode/Props in RN. The `suggestedIndex` in `ShadowNode::replaceChild` (and the overriden one in `YogaLayoutableShadowNode`) is used in a way around the code that suggests that it **is** expected to be negative (checking for non-negativity, assigning -1 as default etc), so having it as a `size_t` type argument both makes things confusing and generates the warning. I believe it's a good idea to be consistent and use the same type for the index throughout. In majority of the cases it's `int32_t` as of now. Reviewed By: rozele Differential Revision: D48059620 fbshipit-source-id: 8550cf78cf4f545081c61e3c88652f9f11cb356f
This pull request was exported from Phabricator. Differential Revision: D48059620 |
rshest
force-pushed
the
export-D48059620
branch
from
August 4, 2023 13:35
7c3532a
to
e7bffd8
Compare
This pull request has been merged in 70365f2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Merged
This PR has been merged.
p: Facebook
Partner: Facebook
Partner
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.
Summary:
Changelog:
[Internal] -
These pop up when compiling with
/Wall
, fixes two legitimate warnings around using YogaShadowNode/Props in RN.The
suggestedIndex
inShadowNode::replaceChild
(and the overriden one inYogaLayoutableShadowNode
) is used in a way around the code that suggests that it is expected to be negative (checking for non-negativity, assigning -1 as default etc), so having it as asize_t
type argument both makes things confusing and generates the warning.I believe it's a good idea to be consistent and use the same type for the index throughout. In majority of the cases it's
int32_t
as of now.Differential Revision: D48059620