Skip to content

Commit d655114

Browse files
christophpurrermeta-codesync[bot]
authored andcommitted
Fix unused parameter warning in propsConversions.h (#56500)
Summary: Pull Request resolved: #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
1 parent cb99ee8 commit d655114

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

packages/react-native/ReactCommon/react/renderer/core/propsConversions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void fromRawValue(const PropsParserContext &context, const RawValue &rawValue, T
101101
}
102102

103103
template <typename T>
104-
void fromRawValue(const PropsParserContext &context, const RawValue &rawValue, T &result)
104+
void fromRawValue(const PropsParserContext & /* context */, const RawValue &rawValue, T &result)
105105
{
106106
result = (T)rawValue;
107107
}

scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,15 +1012,15 @@ folly::dynamic facebook::react::toDynamic(const std::vector<T>& arrayValue);
10121012
template <typename T>
10131013
jni::local_ref<jni::JWeakReference<T>> facebook::react::makeJWeakReference(jni::alias_ref<T> ref);
10141014
template <typename T>
1015-
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result);
1016-
template <typename T>
10171015
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue);
10181016
template <typename T>
10191017
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional<T>& result);
10201018
template <typename T>
10211019
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<T>& result);
10221020
template <typename T>
10231021
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<std::vector<T>>& result);
1022+
template <typename T>
1023+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result);
10241024
template <typename TManager>
10251025
std::shared_ptr<TManager> facebook::react::getManagerByName(std::shared_ptr<const facebook::react::ContextContainer>& contextContainer, const char name[]);
10261026
uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept;

scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,15 +1012,15 @@ folly::dynamic facebook::react::toDynamic(const std::vector<T>& arrayValue);
10121012
template <typename T>
10131013
jni::local_ref<jni::JWeakReference<T>> facebook::react::makeJWeakReference(jni::alias_ref<T> ref);
10141014
template <typename T>
1015-
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result);
1016-
template <typename T>
10171015
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue);
10181016
template <typename T>
10191017
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional<T>& result);
10201018
template <typename T>
10211019
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<T>& result);
10221020
template <typename T>
10231021
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<std::vector<T>>& result);
1022+
template <typename T>
1023+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result);
10241024
template <typename TManager>
10251025
std::shared_ptr<TManager> facebook::react::getManagerByName(std::shared_ptr<const facebook::react::ContextContainer>& contextContainer, const char name[]);
10261026
uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept;

scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4203,15 +4203,15 @@ bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast<T>(faceboo
42034203
template <typename T>
42044204
facebook::react::ModuleConstants<T> facebook::react::typedConstants(typename T::Builder::Input&& value);
42054205
template <typename T>
4206-
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result);
4207-
template <typename T>
42084206
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue);
42094207
template <typename T>
42104208
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional<T>& result);
42114209
template <typename T>
42124210
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<T>& result);
42134211
template <typename T>
42144212
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<std::vector<T>>& result);
4213+
template <typename T>
4214+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result);
42154215
template <typename TManager>
42164216
std::shared_ptr<TManager> facebook::react::getManagerByName(std::shared_ptr<const facebook::react::ContextContainer>& contextContainer, const char name[]);
42174217
uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept;

scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4203,15 +4203,15 @@ bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast<T>(faceboo
42034203
template <typename T>
42044204
facebook::react::ModuleConstants<T> facebook::react::typedConstants(typename T::Builder::Input&& value);
42054205
template <typename T>
4206-
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result);
4207-
template <typename T>
42084206
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue);
42094207
template <typename T>
42104208
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional<T>& result);
42114209
template <typename T>
42124210
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<T>& result);
42134211
template <typename T>
42144212
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<std::vector<T>>& result);
4213+
template <typename T>
4214+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result);
42154215
template <typename TManager>
42164216
std::shared_ptr<TManager> facebook::react::getManagerByName(std::shared_ptr<const facebook::react::ContextContainer>& contextContainer, const char name[]);
42174217
uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept;

scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,15 +581,15 @@ T facebook::react::get(const std::unique_ptr<facebook::react::AnimatedPropBase>&
581581
template <typename T>
582582
bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast<T>(facebook::react::kDefaultEpsilon));
583583
template <typename T>
584-
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result);
585-
template <typename T>
586584
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue);
587585
template <typename T>
588586
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional<T>& result);
589587
template <typename T>
590588
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<T>& result);
591589
template <typename T>
592590
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<std::vector<T>>& result);
591+
template <typename T>
592+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result);
593593
template <typename TManager>
594594
std::shared_ptr<TManager> facebook::react::getManagerByName(std::shared_ptr<const facebook::react::ContextContainer>& contextContainer, const char name[]);
595595
uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept;

scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,15 +581,15 @@ T facebook::react::get(const std::unique_ptr<facebook::react::AnimatedPropBase>&
581581
template <typename T>
582582
bool facebook::react::floatEquality(T a, T b, T epsilon = static_cast<T>(facebook::react::kDefaultEpsilon));
583583
template <typename T>
584-
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result);
585-
template <typename T>
586584
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, T& result, T defaultValue);
587585
template <typename T>
588586
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::optional<T>& result);
589587
template <typename T>
590588
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<T>& result);
591589
template <typename T>
592590
void facebook::react::fromRawValue(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& rawValue, std::vector<std::vector<T>>& result);
591+
template <typename T>
592+
void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, const facebook::react::RawValue& rawValue, T& result);
593593
template <typename TManager>
594594
std::shared_ptr<TManager> facebook::react::getManagerByName(std::shared_ptr<const facebook::react::ContextContainer>& contextContainer, const char name[]);
595595
uint8_t facebook::react::alphaFromColor(facebook::react::SharedColor color) noexcept;

0 commit comments

Comments
 (0)