summaryrefslogtreecommitdiff
path: root/firmware/lib/tpm_lite/tlcl.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-05-07 12:59:47 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-14 20:13:04 -0700
commit52fa8c11f8e5217e17da74c04e8ad1e5aee9ff40 (patch)
treea4894fe06a3f1c9fcbbfe728955f75a8de59ed93 /firmware/lib/tpm_lite/tlcl.c
parent88a47ff99952bb4f270a4e80c80c578e39fb9477 (diff)
downloadvboot-52fa8c11f8e5217e17da74c04e8ad1e5aee9ff40.tar.gz
Makefile: Enable more warnings for host utilities / tests
This patch adds a bunch of more warnings that are already enabled in coreboot and thus already enabled for firmware builds anyway (because coreboot just passes its CFLAGS through). Enabling it in the vboot Makefile means they also apply to host utilities and tests, which sounds desirable for consistency. Fix enough of the cruft and bad coding practices that accumulated over the years of not having warnings enabled to get it to build again (this includes making functions static, removing dead code, cleaning up prototypes, etc.). Also remove -fno-strict-aliasing from the x86 firmware build options, because it's not clear why it's there (coreboot isn't doing this, so presumably it's not needed). BRANCH=None BUG=None TEST=make runtests Change-Id: Ie4a42083c4770a4eca133b22725be9ba85b24184 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1598721 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'firmware/lib/tpm_lite/tlcl.c')
-rw-r--r--firmware/lib/tpm_lite/tlcl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/lib/tpm_lite/tlcl.c b/firmware/lib/tpm_lite/tlcl.c
index c03e8695..41f7cad9 100644
--- a/firmware/lib/tpm_lite/tlcl.c
+++ b/firmware/lib/tpm_lite/tlcl.c
@@ -252,10 +252,10 @@ static uint32_t StartOSAPSession(
/* Fills in the authentication block at the end of the command. The command body
* should already be initialized in |command_buffer|, and the included command
* size should account for the auth block that gets filled in. */
-uint32_t AddRequestAuthBlock(struct auth_session* auth_session,
- uint8_t* command_buffer,
- uint32_t command_buffer_size,
- uint8_t continue_auth_session)
+static uint32_t AddRequestAuthBlock(struct auth_session* auth_session,
+ uint8_t* command_buffer,
+ uint32_t command_buffer_size,
+ uint8_t continue_auth_session)
{
if (!auth_session->valid) {
return TPM_E_AUTHFAIL;
@@ -316,10 +316,10 @@ uint32_t AddRequestAuthBlock(struct auth_session* auth_session,
return TPM_SUCCESS;
}
-uint32_t CheckResponseAuthBlock(struct auth_session* auth_session,
- TPM_COMMAND_CODE ordinal,
- uint8_t* response_buffer,
- uint32_t response_buffer_size)
+static uint32_t CheckResponseAuthBlock(struct auth_session* auth_session,
+ TPM_COMMAND_CODE ordinal,
+ uint8_t* response_buffer,
+ uint32_t response_buffer_size)
{
if (!auth_session->valid) {
return TPM_E_AUTHFAIL;