diff --git a/packages/react-native/React/CxxModule/RCTCxxUtils.mm b/packages/react-native/React/CxxModule/RCTCxxUtils.mm index 68691e540243d0..820b87dd1f8105 100644 --- a/packages/react-native/React/CxxModule/RCTCxxUtils.mm +++ b/packages/react-native/React/CxxModule/RCTCxxUtils.mm @@ -68,7 +68,7 @@ return nil; } @catch (NSException *exception) { return RCTErrorWithNSException(exception); - } @catch (id exception) { + } @catch (id) { // This will catch any other ObjC exception, but no C++ exceptions return RCTErrorWithMessage(@"non-std ObjC Exception"); } diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/tracing/PerformanceTracerCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/tracing/PerformanceTracerCxxInterop.cpp index 6d2c3359073b51..a9349f593bb631 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/tracing/PerformanceTracerCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/tracing/PerformanceTracerCxxInterop.cpp @@ -200,7 +200,7 @@ jint PerformanceTracerCxxInterop::subscribeToTracingStateChanges( onTracingStateChangedMethod( callback, static_cast(isTracing)); }); - } catch (const std::exception& e) { + } catch (const std::exception&) { } } }); diff --git a/packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp b/packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp index 74b820f14f6c4b..b11b2d8d7075e3 100644 --- a/packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp +++ b/packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp @@ -1455,7 +1455,7 @@ TEST_P(JSITest, MicrotasksTest) { EXPECT_EQ( rt.global().getProperty(rt, "globalValue").asString(rt).utf8(rt), "hello world"); - } catch (const JSINativeException& ex) { + } catch (const JSINativeException&) { // queueMicrotask() is unimplemented by some runtimes, ignore such failures. } } @@ -1550,7 +1550,7 @@ TEST_P(JSITest, ArrayBufferSizeTest) { try { // Ensure we can safely write some data to the buffer. memset(ab.data(rt), 0xab, 10); - } catch (const JSINativeException& ex) { + } catch (const JSINativeException&) { // data() is unimplemented by some runtimes, ignore such failures. }