Merge pull request #332 from nsacyber/cpp-error-cleanup

CppCheck cleanup
This commit is contained in:
Cyrus 2021-01-28 10:12:13 -05:00 committed by GitHub
commit 8639e8b708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -251,6 +251,7 @@ if(STATIC_ANALYSIS)
--error-exitcode=1
--verbose
--suppress=readdirCalled
--suppress=passedByValue
-I include/
src/
)

View File

@ -19,8 +19,8 @@ class HirsRuntimeException : public std::runtime_error {
const std::string& origin = "");
public:
HirsRuntimeException(const std::string& origin,
const std::string& msg);
HirsRuntimeException(const std::string& msg,
const std::string& origin);
virtual ~HirsRuntimeException();
};

View File

@ -522,8 +522,9 @@ string CommandTpm2::createNvWriteCommandArgs(const string& nvIndex,
/**
* Method to get a quote (signed pcr selection) from the TPM 2.0 device.
*
* @param pcr_selection selection of pcrs to sign
* @param nonce blob provided by the ACA when the Identity Claim Request
* @param pcr_election selection of pcrs to sign
* @return the argument string to be affixed to tpm quote
*/
string CommandTpm2::getQuote(const string& pcr_selection,
const string& nonce) {