Skip to content

Commit 0e3117c

Browse files
kastiglionefacebook-github-bot
authored andcommitted
Fix format specifier used in RCTCxxMethod
Summary: [`CxxModule::Method::callbacks`](https://github.com/facebook/react-native/blob/2161f92aaf37e126c6906e7ae6202d196b72648c/ReactCommon/cxxreact/CxxModule.h#L66) is `size_t` which uses `%zu` as the format specifier. Newer versions of clang can warn or error on this. This change prevents that from happening. Local builds with clang 5. Closes #15402 Differential Revision: D5583710 Pulled By: javache fbshipit-source-id: 1d1e740c275fddfea177cf9476cd1d03b7e27330
1 parent d013ba3 commit 0e3117c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/CxxModule/RCTCxxMethod.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ - (id)invokeWithBridge:(RCTBridge *)bridge
6666
CxxModule::Callback second;
6767

6868
if (arguments.count < _method->callbacks) {
69-
RCTLogError(@"Method %@.%s expects at least %lu arguments, but got %tu",
69+
RCTLogError(@"Method %@.%s expects at least %zu arguments, but got %tu",
7070
RCTBridgeModuleNameForClass([module class]), _method->name.c_str(),
7171
_method->callbacks, arguments.count);
7272
return nil;

0 commit comments

Comments
 (0)