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:
parent
fe9f2301b5
commit
e35b25e6c0
|
@ -14,6 +14,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <exception>
|
||||||
|
#include <iostream>
|
||||||
#include "PassphraseGenerator.h"
|
#include "PassphraseGenerator.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -78,6 +80,10 @@ class HWIDPassphraseGenerator : public PassphraseGenerator {
|
||||||
class SGXPassphraseGenerator : public PassphraseGenerator {
|
class SGXPassphraseGenerator : public PassphraseGenerator {
|
||||||
public:
|
public:
|
||||||
bool generatePassphrase(string &shaPhrase) override {
|
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
|
// Implement SGX-based passphrase generation
|
||||||
// Replace this with actual generated passphrase
|
// Replace this with actual generated passphrase
|
||||||
return "sgx_generated_passphrase";
|
return "sgx_generated_passphrase";
|
||||||
|
@ -88,6 +94,10 @@ class SGXPassphraseGenerator : public PassphraseGenerator {
|
||||||
class TPMPassphraseGenerator : public PassphraseGenerator {
|
class TPMPassphraseGenerator : public PassphraseGenerator {
|
||||||
public:
|
public:
|
||||||
bool generatePassphrase(string &shaPhrase) override {
|
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
|
// Implement TPM-based passphrase generation
|
||||||
// Replace this with actual generated passphrase
|
// Replace this with actual generated passphrase
|
||||||
return "tpm_generated_passphrase";
|
return "tpm_generated_passphrase";
|
||||||
|
|
Loading…
Reference in New Issue