summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2018-03-15 11:21:22 -0400
committerPeter Jones <pjones@redhat.com>2018-03-15 11:23:26 -0400
commitd737c0273d933f7348eb7adafd4ae772adc9c1b0 (patch)
treeb9168df752a9b3f50c74962fa6f0fb2638bcce86
parent138deeff23707b2db46bbb5c90f1c08bd4b2a429 (diff)
downloadefi-boot-shim-d737c0273d933f7348eb7adafd4ae772adc9c1b0.tar.gz
efi-boot-shim-d737c0273d933f7348eb7adafd4ae772adc9c1b0.zip
Avoid a minor scan-build complaint.
scan-build doesn't like it when we assign return values but don't use them. Signed-off-by: Peter Jones <pjones@redhat.com>
-rw-r--r--shim.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/shim.c b/shim.c
index 51113e20..c62d2fa4 100644
--- a/shim.c
+++ b/shim.c
@@ -1279,7 +1279,10 @@ static EFI_STATUS handle_image (void *data, unsigned int datasize,
return efi_status;
/* Measure the binary into the TPM */
- efi_status = tpm_log_pe((EFI_PHYSICAL_ADDRESS)(UINTN)data, datasize, sha1hash, 4);
+#ifdef REQUIRE_TPM
+ efi_status =
+#endif
+ tpm_log_pe((EFI_PHYSICAL_ADDRESS)(UINTN)data, datasize, sha1hash, 4);
#ifdef REQUIRE_TPM
if (efi_status != EFI_SUCCESS) {
return efi_status;
@@ -1783,7 +1786,10 @@ EFI_STATUS shim_verify (void *buffer, UINT32 size)
goto done;
/* Measure the binary into the TPM */
- efi_status = tpm_log_pe((EFI_PHYSICAL_ADDRESS)(UINTN)buffer, size, sha1hash, 4);
+#ifdef REQUIRE_TPM
+ efi_status =
+#endif
+ tpm_log_pe((EFI_PHYSICAL_ADDRESS)(UINTN)buffer, size, sha1hash, 4);
#ifdef REQUIRE_TPM
if (EFI_ERROR(efi_status))
goto done;