summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Resch <mxre@users.noreply.github.com>2017-04-30 04:11:34 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-29 22:11:34 -0400
commita0693fc9517132cfae773b2b1cfc11b808e9b377 (patch)
tree1f3e6f4dda78277d8fe1105198d89b34fe0b10c8
parent815e542b7caee5166668180c8014e29bfe3bf1f8 (diff)
sd-boot: remove compiler warning (#5860)
This small fixup removes a compiler warning when passing tcg (a const arg type) to the uefi call wapper, which does not define it as const. All other source files in sd-boot do this cast except measure.c, so let's fix that.
-rw-r--r--src/boot/efi/measure.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/boot/efi/measure.c b/src/boot/efi/measure.c
index 4ac11a9bb0..b22d37b62d 100644
--- a/src/boot/efi/measure.c
+++ b/src/boot/efi/measure.c
@@ -199,7 +199,7 @@ static EFI_STATUS tpm1_measure_to_pcr_and_event_log(const EFI_TCG *tcg, UINT32 p
event_number = 1;
status = uefi_call_wrapper(tcg->HashLogExtendEvent, 7,
- tcg, buffer, buffer_size, TCG_ALG_SHA, tcg_event, &event_number, &event_log_last);
+ (EFI_TCG *) tcg, buffer, buffer_size, TCG_ALG_SHA, tcg_event, &event_number, &event_log_last);
if (EFI_ERROR(status))
return status;
@@ -219,7 +219,7 @@ static EFI_STATUS tpm1_measure_to_pcr_and_event_log(const EFI_TCG *tcg, UINT32 p
*/
static EFI_STATUS trigger_tcg2_final_events_table(const EFI_TCG2 *tcg)
{
- return uefi_call_wrapper(tcg->GetEventLog, 5, tcg,
+ return uefi_call_wrapper(tcg->GetEventLog, 5, (EFI_TCG2 *) tcg,
EFI_TCG2_EVENT_LOG_FORMAT_TCG_2, NULL,
NULL, NULL);
}
@@ -254,7 +254,7 @@ static EFI_STATUS tpm2_measure_to_pcr_and_event_log(const EFI_TCG2 *tcg, UINT32
CopyMem((VOID *) tcg_event->Event, (VOID *) description, desc_len);
- status = uefi_call_wrapper(tcg->HashLogExtendEvent, 5, tcg, 0, buffer, buffer_size, tcg_event);
+ status = uefi_call_wrapper(tcg->HashLogExtendEvent, 5, (EFI_TCG2 *) tcg, 0, buffer, buffer_size, tcg_event);
uefi_call_wrapper(BS->FreePool, 1, tcg_event);