mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Enable -Wunused-variable in js/PACKAGE (#49454)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49454 This diff enables compilation warning flags for the directory in question. Further details are in [this workplace post](https://fb.workplace.com/permalink.php?story_fbid=pfbid02XaWNiCVk69r1ghfvDVpujB8Hr9Y61uDvNakxiZFa2jwiPHscVdEQwCBHrmWZSyMRl&id=100051201402394). This is a low-risk diff. There are **no run-time effects** and the diff has already been observed to compile locally. **If the code compiles, it work; test errors are spurious.** Differential Revision: D68513114 fbshipit-source-id: 219e2b9f2961da76cec4d08cc9f77787e08a0a1e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1498566c23
commit
acdddef48e
@@ -468,7 +468,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init);
|
||||
- (dispatch_queue_t)methodQueue
|
||||
{
|
||||
if (_bridge.valid) {
|
||||
id instance = self.instance;
|
||||
__unused id instance = self.instance;
|
||||
RCTAssert(_methodQueue != nullptr, @"Module %@ has no methodQueue (instance: %@)", self, instance);
|
||||
}
|
||||
return _methodQueue;
|
||||
|
||||
@@ -1097,7 +1097,7 @@ RCT_EXTERN BOOL RCTValidateTypeOfViewCommandArgument(
|
||||
const NSString *argPos)
|
||||
{
|
||||
if (![obj isKindOfClass:expectedClass]) {
|
||||
NSString *kindOfClass = RCTHumanReadableType(obj);
|
||||
__unused NSString *kindOfClass = RCTHumanReadableType(obj);
|
||||
|
||||
RCTLogError(
|
||||
@"%@ command %@ received %@ argument of type %@, expected %@.",
|
||||
|
||||
Reference in New Issue
Block a user