luks-fs-mgr: fix compilation errors

* Add missing includes
* Suppress "unused parameter" warnings because this project is built
  with -Werror

TESTS
============================
* Reproduce the build error
* Apply this fix, rebuild and make sure it compiles w/o issues

Closes-Bug: 2039980
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I05bf30845d775e9d754fb61625d2eb13c3712d47
This commit is contained in:
Davlet Panech 2023-10-20 11:30:25 -04:00
parent fe9f2301b5
commit e35b25e6c0
1 changed files with 10 additions and 0 deletions

View File

@ -14,6 +14,8 @@
#include <string>
#include <unistd.h>
#include <memory>
#include <exception>
#include <iostream>
#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";