Commit 5d9b3b1
Fix unused variable 'moduleClass' in RCTTurboModuleManager.mm
Summary:
Pika 27 (LLVM 21 / Swift 6.4) flags `Class moduleClass = [module class];` as an unused variable (`-Werror,-Wunused-variable`) in `RCTTurboModuleManager.mm`. Its only reference is inside an `RCTLogError` call, which compiles to a no-op in release builds, leaving the variable unused.
This inlines `[module class]` directly into the `RCTLogError` call and removes the local declaration. The expression is now elided together with the log macro in release builds, eliminating the dangling unused variable. Debug logging behavior is identical.
No `#pragma` diagnostic suppression is used, per the task requirements.
[Session trajectory link](https://www.internalfb.com/intern/devai/devmate/inspector/?id=36a6fdd8-65cb-4fd8-bbc5-6d4afa5245dd)
Reviewed By: javache
Differential Revision: D1086056401 parent 097dbc2 commit 5d9b3b1
1 file changed
Lines changed: 1 addition & 2 deletions
File tree
- packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
| |||
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
348 | | - | |
| 347 | + | |
349 | 348 | | |
350 | 349 | | |
351 | 350 | | |
| |||
0 commit comments