Skip to content

Commit

Permalink
Fix unused warnings
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=249734

Reviewed by Yusuke Suzuki.

* Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp:
* Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp:
* Source/WebDriver/Session.cpp:
* Source/WebDriver/playstation/WebDriverServicePlayStation.cpp:
* Tools/WebKitTestRunner/TestOptions.cpp:

Canonical link: https://commits.webkit.org/258251@main
  • Loading branch information
donny-dont committed Dec 22, 2022
1 parent 89c98f4 commit dc5576a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp
Expand Up @@ -136,6 +136,9 @@ void MediaKeys::setServerCertificate(const BufferSource& serverCertificate, Ref<
// 5.1. Use this object's cdm instance to process certificate.
ALWAYS_LOG(identifier);
m_instance->setServerCertificate(WTFMove(certificate), [this, protectedThis = Ref { *this }, promise = WTFMove(promise), identifier = WTFMove(identifier)] (auto success) {
#if RELEASE_LOG_DISABLED
UNUSED_PARAM(this);
#endif
// 5.2. If the preceding step failed, resolve promise with a new DOMException whose name is the appropriate error name.
// 5.1. [Else,] Resolve promise with true.
if (success == CDMInstance::Failed) {
Expand Down
9 changes: 6 additions & 3 deletions Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp
Expand Up @@ -70,15 +70,18 @@ struct LogArgument<std::optional<T>> {

namespace WebCore {

#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
template<typename... Arguments>
inline void infoLog(Logger& logger, const Arguments&... arguments)
{
#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
logger.info(LogEME, arguments...);
}
#else
UNUSED_PARAM(logger);
#endif
template<typename... Arguments>
inline void infoLog(Logger&, const Arguments&...)
{
}
#endif

static void tryNextSupportedConfiguration(Document&, RefPtr<CDM>&&, Vector<MediaKeySystemConfiguration>&&, RefPtr<DeferredPromise>&&, Ref<Logger>&&, Logger::LogSiteIdentifier&&);

Expand Down
2 changes: 1 addition & 1 deletion Source/WebDriver/Session.cpp
Expand Up @@ -577,7 +577,7 @@ void Session::switchToBrowsingContext(const String& toplevelBrowsingContext, con
auto parameters = JSON::Object::create();
parameters->setString("browsingContextHandle"_s, toplevelBrowsingContext);
parameters->setString("frameHandle"_s, browsingContext);
m_host->sendCommandToBackend("switchToBrowsingContext"_s, WTFMove(parameters), [this, completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
m_host->sendCommandToBackend("switchToBrowsingContext"_s, WTFMove(parameters), [completionHandler = WTFMove(completionHandler)](SessionHost::CommandResponse&& response) {
if (response.isError) {
completionHandler(CommandResult::fail(WTFMove(response.responseObject)));
return;
Expand Down
Expand Up @@ -50,7 +50,7 @@ Capabilities WebDriverService::platformCapabilities()
return capabilities;
}

bool WebDriverService::platformCompareBrowserVersions(const String& requiredVersion, const String& proposedVersion)
bool WebDriverService::platformCompareBrowserVersions(const String&, const String&)
{
return true;
}
Expand Down
2 changes: 2 additions & 0 deletions Tools/WebKitTestRunner/TestOptions.cpp
Expand Up @@ -45,11 +45,13 @@ static constexpr bool mediaSourceEnabledValue = false;
static constexpr bool mediaSourceEnabledValue = true;
#endif

#if ENABLE(GPU_PROCESS)
#if PLATFORM(IOS_FAMILY)
static constexpr bool fullGPUProcessEnabledValue = true;
#else
static constexpr bool fullGPUProcessEnabledValue = false;
#endif
#endif

#if PLATFORM(MAC)
static constexpr bool eventHandlerDrivenSmoothKeyboardScrollingEnabledValue = true;
Expand Down

0 comments on commit dc5576a

Please sign in to comment.