From d65511474ffa6ee4ce10ff5720f2bea84868703b Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Tue, 21 Apr 2026 18:00:32 -0700 Subject: [PATCH] Fix unused parameter warning in propsConversions.h (#56500) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56500 Fixed clang-diagnostic-unused-parameter warning in React Native's propsConversions.h by commenting out the unused `context` parameter in the `fromRawValue` template function. This change maintains API compatibility while resolving the compiler warning. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D101111638 fbshipit-source-id: dd842db66917fe68878ddcc9d364ba3f7455a641 --- .../ReactCommon/react/renderer/core/propsConversions.h | 2 +- scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api | 4 ++-- scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api | 4 ++-- scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api | 4 ++-- scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api | 4 ++-- scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api | 4 ++-- scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h b/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h index 6148f7f71d6..1b1cb73208e 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h +++ b/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h @@ -101,7 +101,7 @@ void fromRawValue(const PropsParserContext &context, const RawValue &rawValue, T } template -void fromRawValue(const PropsParserContext &context, const RawValue &rawValue, T &result) +void fromRawValue(const PropsParserContext & /* context */, const RawValue &rawValue, T &result) { result = (T)rawValue; } diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api index d6da4543b31..c21d8cb3f95 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api @@ -1012,8 +1012,6 @@ folly::dynamic facebook::react::toDynamic(const std::vector& arrayValue); template jni::local_ref> facebook::react::makeJWeakReference(jni::alias_ref ref); template -void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result); -template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional& result); @@ -1021,6 +1019,8 @@ template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector& result); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector>& result); +template +void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result); template std::shared_ptr facebook::react::getManagerByName(std::shared_ptr& contextContainer, const char name[]); uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api index 761824e2d82..c68c15ab574 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api @@ -1012,8 +1012,6 @@ folly::dynamic facebook::react::toDynamic(const std::vector& arrayValue); template jni::local_ref> facebook::react::makeJWeakReference(jni::alias_ref ref); template -void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result); -template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional& result); @@ -1021,6 +1019,8 @@ template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector& result); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector>& result); +template +void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result); template std::shared_ptr facebook::react::getManagerByName(std::shared_ptr& contextContainer, const char name[]); uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 20544511a83..1d91854607b 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -4203,8 +4203,6 @@ bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast(faceboo template facebook::react::ModuleConstants facebook::react::typedConstants(typename T::Builder::Input&& value); template -void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result); -template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional& result); @@ -4212,6 +4210,8 @@ template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector& result); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector>& result); +template +void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result); template std::shared_ptr facebook::react::getManagerByName(std::shared_ptr& contextContainer, const char name[]); uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index b16776b44a6..998724f15d4 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -4203,8 +4203,6 @@ bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast(faceboo template facebook::react::ModuleConstants facebook::react::typedConstants(typename T::Builder::Input&& value); template -void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result); -template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional& result); @@ -4212,6 +4210,8 @@ template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector& result); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector>& result); +template +void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result); template std::shared_ptr facebook::react::getManagerByName(std::shared_ptr& contextContainer, const char name[]); uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api index 2223d18a695..69deab999b9 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api @@ -581,8 +581,6 @@ T facebook::react::get(const std::unique_ptr& template bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast(facebook::react::kDefaultEpsilon)); template -void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result); -template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional& result); @@ -590,6 +588,8 @@ template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector& result); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector>& result); +template +void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result); template std::shared_ptr facebook::react::getManagerByName(std::shared_ptr& contextContainer, const char name[]); uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api index 244e66ee698..b9921b567fe 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api @@ -581,8 +581,6 @@ T facebook::react::get(const std::unique_ptr& template bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast(facebook::react::kDefaultEpsilon)); template -void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result); -template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional& result); @@ -590,6 +588,8 @@ template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector& result); template void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector>& result); +template +void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result); template std::shared_ptr facebook::react::getManagerByName(std::shared_ptr& contextContainer, const char name[]); uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept;