diff --git a/filesystem/luks/src/encryption/PassphraseGenerator.cpp b/filesystem/luks/src/encryption/PassphraseGenerator.cpp index 47fb14db9..d89a7e061 100644 --- a/filesystem/luks/src/encryption/PassphraseGenerator.cpp +++ b/filesystem/luks/src/encryption/PassphraseGenerator.cpp @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include "PassphraseGenerator.h" using namespace std; @@ -78,6 +80,10 @@ class HWIDPassphraseGenerator : public PassphraseGenerator { class SGXPassphraseGenerator : public PassphraseGenerator { public: bool generatePassphrase(string &shaPhrase) override { + // Pretend like shaPhrase is used, to avoid getting the + // "unused parameter" message from the compiler, which results in + // compliation errors due to -Werror. + (void)shaPhrase; // Implement SGX-based passphrase generation // Replace this with actual generated passphrase return "sgx_generated_passphrase"; @@ -88,6 +94,10 @@ class SGXPassphraseGenerator : public PassphraseGenerator { class TPMPassphraseGenerator : public PassphraseGenerator { public: bool generatePassphrase(string &shaPhrase) override { + // Pretend like shaPhrase is used, to avoid getting the + // "unused parameter" message from the compiler, which results in + // compliation errors due to -Werror. + (void)shaPhrase; // Implement TPM-based passphrase generation // Replace this with actual generated passphrase return "tpm_generated_passphrase";