]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
efi/tpm.c: Add missing casts
authorVladimir Serbinenko <phcoder@gmail.com>
Fri, 22 Mar 2019 15:07:47 +0000 (16:07 +0100)
committerVladimir Serbinenko <phcoder@google.com>
Tue, 26 Mar 2019 14:05:44 +0000 (15:05 +0100)
Without those casts we get a warning about implicit conversion of pointer
to integer.

Signed-off-by: Vladimir Serbinenko <phcoder@google.com>
grub-core/commands/efi/tpm.c

index 7475fd87b47ad7d88101ab9a2a9ff9bad2d6b586..32909c192ff09e713bbadbe82c9771800fd101d0 100644 (file)
@@ -245,7 +245,7 @@ grub_tpm1_log_event (grub_efi_handle_t tpm_handle, unsigned char *buf,
   grub_memcpy (event->Event, description, event->EventSize);
 
   algorithm = TCG_ALG_SHA;
-  status = efi_call_7 (tpm->log_extend_event, tpm, buf, (grub_uint64_t) size,
+  status = efi_call_7 (tpm->log_extend_event, tpm, (grub_addr_t) buf, (grub_uint64_t) size,
                       algorithm, event, &eventnum, &lastevent);
 
   switch (status)
@@ -295,7 +295,7 @@ grub_tpm2_log_event (grub_efi_handle_t tpm_handle, unsigned char *buf,
     sizeof (*event) - sizeof (event->Event) + grub_strlen (description) + 1;
   grub_memcpy (event->Event, description, grub_strlen (description) + 1);
 
-  status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
+  status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, (grub_addr_t) buf,
                       (grub_uint64_t) size, event);
 
   switch (status)