Skip to content

Enabling [-Werror,-Wunused-property-ivar]#28895

Closed
aditya7fb wants to merge 1 commit into
facebook:masterfrom
aditya7fb:export-D20961613
Closed

Enabling [-Werror,-Wunused-property-ivar]#28895
aditya7fb wants to merge 1 commit into
facebook:masterfrom
aditya7fb:export-D20961613

Conversation

@aditya7fb
Copy link
Copy Markdown
Contributor

Summary:
Changelog:
Enabling [-Werror,-Wunused-property-ivar]

Reviewed By: jdthomas

Differential Revision: D20961613

Summary:
Changelog:
Enabling [-Werror,-Wunused-property-ivar]

Reviewed By: jdthomas

Differential Revision: D20961613

fbshipit-source-id: a1957de5af686b7b8ac749830e29a6e824e98d6a
@facebook-github-bot 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 May 14, 2020
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D20961613

@pull-bot
Copy link
Copy Markdown

Messages
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

DetailsCATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.
📖 📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.

Generated by 🚫 dangerJS against 59cc01d

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 6,781,362 0
android hermes armeabi-v7a 6,444,863 0
android hermes x86 7,168,165 0
android hermes x86_64 7,059,298 0
android jsc arm64-v8a 8,949,571 0
android jsc armeabi-v7a 8,605,462 0
android jsc x86 8,779,502 0
android jsc x86_64 9,356,277 0

Base commit: 5c0a3a6

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented May 14, 2020

Platform Engine Arch Size (bytes) Diff
ios - universal 10,728,464 0

Base commit: 5c0a3a6


- (void)setShowSoftInputOnFocus:(BOOL)showSoftInputOnFocus
{
(void)_showSoftInputOnFocus;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we instead have the compiler avoid generating an ivar by adding an explicit getter? As it stands now if someone tries to access showSoftInputOnFocus they will always get NO regardless of what has been set.

- (BOOL)showSoftInputOnFocus
{
  return [[self backedTextInputView] inputView] == nil;
}

Alternatively, just declare a setter and not a property if it is not meant to be gotten

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the source code. I'm enabling the warning across the entire codebase for safeguard against future errors. Using (void)decl; seems like a safe approach. Could you suggest a patch i can use? I can also disable the warning in this build target as in the React/CoreModules below.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @aditya7fb in c2c0581.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label May 15, 2020
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants