summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2011-05-09 15:30:33 -0700
committerBill Richardson <wfrichar@chromium.org>2011-05-09 15:57:09 -0700
commit4395b699c13bcce3f4152cc0f6f5cef9817d2537 (patch)
tree9bf53f6e5e816cebf82e7783b9b442af5c1f9f75 /firmware
parent54e95825b30d4f730cbd70c109fb6622dda6fbb8 (diff)
downloadvboot-4395b699c13bcce3f4152cc0f6f5cef9817d2537.tar.gz
Address compiler warnings (errors) for gcc-4.6
BUG=chromium-os:15043 TEST=manual Change-Id: If6499d9453fd6f754d04076d0e2b6fd25fc636e5 Reviewed-on: http://gerrit.chromium.org/gerrit/562 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/stub/tpm_lite_stub.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/stub/tpm_lite_stub.c b/firmware/stub/tpm_lite_stub.c
index 2351ee47..c1ef88b8 100644
--- a/firmware/stub/tpm_lite_stub.c
+++ b/firmware/stub/tpm_lite_stub.c
@@ -155,7 +155,9 @@ uint32_t TlclStubSendReceive(const uint8_t* request, int request_length,
* // Error checking depending on the value of the status above
*/
uint32_t response_length = max_length;
+#ifndef NDEBUG
int tag, response_tag;
+#endif
struct timeval before, after;
gettimeofday(&before, NULL);
@@ -178,6 +180,7 @@ uint32_t TlclStubSendReceive(const uint8_t* request, int request_length,
}
#endif
+#ifndef NDEBUG
/* sanity checks */
tag = TpmTag(request);
response_tag = TpmTag(response);
@@ -189,6 +192,7 @@ uint32_t TlclStubSendReceive(const uint8_t* request, int request_length,
(tag == TPM_TAG_RQU_AUTH2_COMMAND &&
response_tag == TPM_TAG_RSP_AUTH2_COMMAND));
assert(response_length == TpmResponseSize(response));
+#endif
return 0; /* Success */
}