Skip to content

Commit

Permalink
Follow-up: Fix warnings found by compiling with -Wformat in open sour…
Browse files Browse the repository at this point in the history
…ce clang-17

https://bugs.webkit.org/show_bug.cgi?id=267207
<rdar://120610377>

Unreviewed follow-up fix.

These logging messages are only compiled on Debug builds.

* Source/WebCore/testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::maybeDetermineStatus):
* Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived):

Canonical link: https://commits.webkit.org/272826@main
  • Loading branch information
David Kilzer authored and ddkilzer committed Jan 9, 2024
1 parent 55aa242 commit d0259b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Source/WebCore/testing/MockContentFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "ResourceResponse.h"
#include "SharedBuffer.h"
#include <mutex>
#include <wtf/EnumTraits.h>
#include <wtf/text/CString.h>

namespace WebCore {
Expand Down Expand Up @@ -142,7 +143,7 @@ void MockContentFilter::maybeDetermineStatus(DecisionPoint decisionPoint)
if (m_state != State::Filtering || decisionPoint != settings().decisionPoint())
return;

LOG(ContentFiltering, "MockContentFilter stopped buffering with state %u at decision point %hhu.\n", m_state, decisionPoint);
LOG(ContentFiltering, "MockContentFilter stopped buffering with state %u at decision point %hhu.\n", enumToUnderlyingType(m_state), enumToUnderlyingType(decisionPoint));

m_state = settings().decision() == Decision::Allow ? State::Allowed : State::Blocked;
if (m_state != State::Blocked)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <WebCore/ExceptionData.h>
#include <WebCore/Pin.h>
#include <WebCore/U2fCommandConstructor.h>
#include <wtf/EnumTraits.h>
#include <wtf/RunLoop.h>
#include <wtf/text/StringConcatenateNumbers.h>

Expand Down Expand Up @@ -125,7 +126,7 @@ void CtapAuthenticator::continueMakeCredentialAfterResponseReceived(Vector<uint8
auto response = readCTAPMakeCredentialResponse(data, AuthenticatorAttachment::CrossPlatform, transports(), std::get<PublicKeyCredentialCreationOptions>(requestData().options).attestation);
if (!response) {
auto error = getResponseCode(data);
RELEASE_LOG_DEBUG(WebAuthn, "Got error code: %hhu from authenticator.", error);
RELEASE_LOG_DEBUG(WebAuthn, "Got error code: %hhu from authenticator.", enumToUnderlyingType(error));

if (error == CtapDeviceResponseCode::kCtap2ErrActionTimeout) {
makeCredential();
Expand Down

0 comments on commit d0259b0

Please sign in to comment.