Bug 1732245 - Silence the unused-but-set-variable warning in dom/webauthn. r=keeler

dom/webauthn/WinWebAuthnManager.cpp(274,11): error: variable 'winAttestation' set but not used [-Werror,-Wunused-but-set-variable]
    DWORD winAttestation = WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_ANY;
          ^
dom/webauthn/WinWebAuthnManager.cpp(529,9): error: variable 'winAttachment' set but not used [-Werror,-Wunused-but-set-variable]
  DWORD winAttachment = WEBAUTHN_AUTHENTICATOR_ATTACHMENT_ANY;
        ^

Differential Revision: https://phabricator.services.mozilla.com/D126449
This commit is contained in:
Mike Hommey 2021-09-27 23:43:16 +00:00
parent 5ae6eff43a
commit 585adbd4da

View File

@ -271,7 +271,6 @@ void WinWebAuthnManager::Register(
// AttestationConveyance
AttestationConveyancePreference attestation =
extra.attestationConveyancePreference();
DWORD winAttestation = WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_ANY;
switch (attestation) {
case AttestationConveyancePreference::Direct:
winAttestation = WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_DIRECT;
@ -627,7 +626,7 @@ void WinWebAuthnManager::Sign(PWebAuthnTransactionParent* aTransactionParent,
aInfo.TimeoutMS(),
{0, NULL},
{0, NULL},
WEBAUTHN_AUTHENTICATOR_ATTACHMENT_ANY,
winAttachment,
winUserVerificationReq,
0, // dwFlags
winAppIdentifier,