mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-10 06:44:02 +00:00
tpm2: Coverity: Deactivate dead functions
CryptHashCopyState is not called from anywhere and the useless call to CryptGetHashDef() it does obviously doesn't matter. Deactivate the whole function using #if 0. NvClearPersistent() and NvUpdatePersistent() are not used, either, so we can also deactivate them and suppress a pointer related issue that Coverity is complaining about. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
dc55da502e
commit
a433bf1217
@ -186,6 +186,7 @@ NvWrite(
|
||||
SET_NV_UPDATE(UT_NV);
|
||||
return;
|
||||
}
|
||||
#if 0 // libtpms added being (for Coverity)
|
||||
/* 8.5.3.7 NvUpdatePersistent() */
|
||||
/* This function is used to update a value in the PERSISTENT_DATA structure and commits the value to
|
||||
NV. */
|
||||
@ -213,6 +214,7 @@ NvClearPersistent(
|
||||
MemorySet((&gp) + offset, 0, size);
|
||||
NvWrite(offset, size, (&gp) + offset);
|
||||
}
|
||||
#endif // libtpms added end
|
||||
/* 8.5.3.9 NvReadPersistent() */
|
||||
/* This function reads persistent data to the RAM copy of the gp structure. */
|
||||
void
|
||||
|
||||
@ -270,6 +270,7 @@ CryptHashGetContextAlg(
|
||||
/* 10.2.13.5 State Import and Export */
|
||||
/* 10.2.13.5.1 CryptHashCopyState */
|
||||
/* This function is used to clone a HASH_STATE. */
|
||||
#if 0 // libtpms added begin
|
||||
LIB_EXPORT void
|
||||
CryptHashCopyState(
|
||||
HASH_STATE *out, // OUT: destination of the state
|
||||
@ -294,6 +295,7 @@ CryptHashCopyState(
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif // libtpms added end
|
||||
/* 10.2.13.5.2 CryptHashExportState() */
|
||||
/* This function is used to export a hash or HMAC hash state. This function would be called when
|
||||
preparing to context save a sequence object. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user