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:
Richard Barnes
2025-02-16 10:16:22 -08:00
committed by Facebook GitHub Bot
parent 1498566c23
commit acdddef48e
2 changed files with 2 additions and 2 deletions
@@ -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;
+1 -1
View File
@@ -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 %@.",