Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ class JSIExecutor::NativeModuleProxy : public jsi::HostObject {
return nativeModules->getModule(rt, name);
}

void set(Runtime&, const PropNameID&, const Value&) override {
void set(
Runtime& /*unused*/,
const PropNameID& /*name*/,
const Value& /*value*/) override {
throw std::runtime_error(
"Unable to put on NativeModules: Operation unsupported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class [[deprecated(
std::unique_ptr<const JSBigString> script,
std::string sourceURL) override;
#ifndef RCT_REMOVE_LEGACY_ARCH
void setBundleRegistry(std::unique_ptr<RAMBundleRegistry>) override;
void setBundleRegistry(std::unique_ptr<RAMBundleRegistry> r) override;
#endif // RCT_REMOVE_LEGACY_ARCH
void registerBundle(uint32_t bundleId, const std::string& bundlePath)
override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,28 @@ namespace facebook::react::jsinspector_modern {
*/
template <size_t key>
struct UniqueMonostate {
constexpr bool operator==(const UniqueMonostate<key>&) const noexcept {
constexpr bool operator==(
const UniqueMonostate<key>& /*unused*/) const noexcept {
return true;
}
constexpr bool operator!=(const UniqueMonostate<key>&) const noexcept {
constexpr bool operator!=(
const UniqueMonostate<key>& /*unused*/) const noexcept {
return false;
}
constexpr bool operator<(const UniqueMonostate<key>&) const noexcept {
constexpr bool operator<(
const UniqueMonostate<key>& /*unused*/) const noexcept {
return false;
}
constexpr bool operator>(const UniqueMonostate<key>&) const noexcept {
constexpr bool operator>(
const UniqueMonostate<key>& /*unused*/) const noexcept {
return false;
}
constexpr bool operator<=(const UniqueMonostate<key>&) const noexcept {
constexpr bool operator<=(
const UniqueMonostate<key>& /*unused*/) const noexcept {
return true;
}
constexpr bool operator>=(const UniqueMonostate<key>&) const noexcept {
constexpr bool operator>=(
const UniqueMonostate<key>& /*unused*/) const noexcept {
return true;
}
};
Expand All @@ -45,8 +51,8 @@ namespace std {
template <size_t key>
struct hash<::facebook::react::jsinspector_modern::UniqueMonostate<key>> {
size_t operator()(
const ::facebook::react::jsinspector_modern::UniqueMonostate<key>&)
const noexcept {
const ::facebook::react::jsinspector_modern::UniqueMonostate<
key>& /*unused*/) const noexcept {
return key;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class MockRuntimeAgentDelegate : public RuntimeAgentDelegate {
inline MockRuntimeAgentDelegate(
FrontendChannel frontendChannel,
SessionState& sessionState,
std::unique_ptr<RuntimeAgentDelegate::ExportedState>,
std::unique_ptr<RuntimeAgentDelegate::ExportedState> /*unused*/,
ExecutionContextDescription executionContextDescription,
const RuntimeExecutor& /*runtimeExecutor*/)
: frontendChannel(std::move(frontendChannel)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class JsiIntegrationPortableTestBase : public ::testing::Test,
}

void onSetPausedInDebuggerMessage(
const OverlaySetPausedInDebuggerMessageRequest&) override {}
const OverlaySetPausedInDebuggerMessageRequest& /*request*/) override {}
};

} // namespace facebook::react::jsinspector_modern
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MockMessageQueueThread : public react::MessageQueueThread {
void runOnQueue(std::function<void()>&& func) override;

// Unused
void runOnQueueSync(std::function<void()>&&) override;
void runOnQueueSync(std::function<void()>&& callback) override;

// Unused
void quitSynchronous() override;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/ReactCommon/react/bridging/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct BridgingStatic {
facebook::jsi::Runtime& rt,
const T& array,
const std::shared_ptr<CallInvoker>& jsInvoker,
std::index_sequence<Index...>) {
std::index_sequence<Index...> /*unused*/) {
return jsi::Array::createWithElements(
rt, bridging::toJs(rt, std::get<Index>(array), jsInvoker)...);
}
Expand Down
7 changes: 4 additions & 3 deletions packages/react-native/ReactCommon/react/bridging/Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct Bridging;
template <>
struct Bridging<void> {
// Highly generic code may result in "casting" to void.
static void fromJs(jsi::Runtime&, const jsi::Value&) {}
static void fromJs(jsi::Runtime& /*unused*/, const jsi::Value& /*unused*/) {}
};

namespace bridging {
Expand Down Expand Up @@ -105,15 +105,16 @@ template <typename T>
auto toJs(
jsi::Runtime& rt,
T&& value,
const std::shared_ptr<CallInvoker>& = nullptr) -> remove_cvref_t<T> {
const std::shared_ptr<CallInvoker>& /*unused*/ = nullptr)
-> remove_cvref_t<T> {
return convert(rt, std::forward<T>(value));
}

template <typename T>
auto toJs(
jsi::Runtime& rt,
T&& value,
const std::shared_ptr<CallInvoker>& = nullptr)
const std::shared_ptr<CallInvoker>& /*unused*/ = nullptr)
-> decltype(Bridging<bridging_t<T>>::toJs(rt, std::forward<T>(value))) {
return Bridging<bridging_t<T>>::toJs(rt, std::forward<T>(value));
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/ReactCommon/react/bridging/Bool.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace facebook::react {

template <>
struct Bridging<bool> {
static bool fromJs(jsi::Runtime&, const jsi::Value& value) {
static bool fromJs(jsi::Runtime& /*unused*/, const jsi::Value& value) {
return value.asBool();
}

Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/ReactCommon/react/bridging/Class.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ JSReturnT callFromJs(
}

template <typename ReturnT, typename... ArgsT>
constexpr size_t getParameterCount(ReturnT (*)(ArgsT...)) {
constexpr size_t getParameterCount(ReturnT (* /*unused*/)(ArgsT...)) {
return sizeof...(ArgsT);
}

template <typename Class, typename ReturnT, typename... ArgsT>
constexpr size_t getParameterCount(ReturnT (Class::*)(ArgsT...)) {
constexpr size_t getParameterCount(ReturnT (Class::* /*unused*/)(ArgsT...)) {
return sizeof...(ArgsT);
}

Expand Down
5 changes: 3 additions & 2 deletions packages/react-native/ReactCommon/react/bridging/Function.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ class SyncCallback<R(Args...)> {
}

template <size_t... Index>
R apply(std::tuple<Args...>&& args, std::index_sequence<Index...>) const {
R apply(std::tuple<Args...>&& args, std::index_sequence<Index...> /*unused*/)
const {
return call(std::move(std::get<Index>(args))...);
}

Expand Down Expand Up @@ -262,7 +263,7 @@ struct Bridging<std::function<R(Args...)>> {
jsi::Runtime& rt,
const jsi::Value* args,
const std::shared_ptr<CallInvoker>& jsInvoker,
std::index_sequence<Index...>) {
std::index_sequence<Index...> /*unused*/) {
return fn(bridging::fromJs<Args>(rt, args[Index], jsInvoker)...);
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/ReactCommon/react/bridging/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct Bridging<std::nullptr_t> {
}
}

static std::nullptr_t toJs(jsi::Runtime&, std::nullptr_t) {
static std::nullptr_t toJs(jsi::Runtime& /*unused*/, std::nullptr_t) {
return nullptr;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class JSI_EXPORT JavaTurboModule : public TurboModule {
protected:
void configureEventEmitterCallback();

[[deprecated]] void setEventEmitterCallback(jni::alias_ref<jobject>) {
[[deprecated]] void setEventEmitterCallback(
jni::alias_ref<jobject> /*unused*/) {
configureEventEmitterCallback();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class ParagraphAttributes : public DebugStringConvertible {
*/
std::optional<TextAlignmentVertical> textAlignVertical{};

bool operator==(const ParagraphAttributes&) const;
bool operator!=(const ParagraphAttributes&) const;
bool operator==(const ParagraphAttributes& rhs) const;
bool operator!=(const ParagraphAttributes& rhs) const;

#pragma mark - DebugStringConvertible

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ inline void fromRawValue(
}

inline void fromRawValue(
const PropsParserContext&,
const PropsParserContext& /*unused*/,
const RawValue& value,
AccessibilityValue& result) {
auto map = (std::unordered_map<std::string, RawValue>)value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CSSValueParser {
template <CSSDataType... AllowedTypesT>
constexpr std::variant<std::monostate, AllowedTypesT...> consumeValue(
CSSDelimiter delimeter,
CSSCompoundDataType<AllowedTypesT...>) {
CSSCompoundDataType<AllowedTypesT...> /*unused*/) {
using ReturnT = std::variant<std::monostate, AllowedTypesT...>;

auto consumedValue =
Expand Down
Loading