Enabling [-Werror,-Wunused-property-ivar]#28895
Conversation
Summary: Changelog: Enabling [-Werror,-Wunused-property-ivar] Reviewed By: jdthomas Differential Revision: D20961613 fbshipit-source-id: a1957de5af686b7b8ac749830e29a6e824e98d6a
|
This pull request was exported from Phabricator. Differential Revision: D20961613 |
|
Base commit: 5c0a3a6 |
Base commit: 5c0a3a6 |
|
|
||
| - (void)setShowSoftInputOnFocus:(BOOL)showSoftInputOnFocus | ||
| { | ||
| (void)_showSoftInputOnFocus; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
This pull request was successfully merged by @aditya7fb in c2c0581. When will my fix make it into a release? | Upcoming Releases |
Summary:
Changelog:
Enabling [-Werror,-Wunused-property-ivar]
Reviewed By: jdthomas
Differential Revision: D20961613