On 9/19/24 3:45 AM, Gary Lin wrote:
On Wed, Sep 18, 2024 at 11:22:16AM -0400, Stefan Berger wrote:
*handle = (TPM_HANDLE_t) num;
How about this change?
- return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value %lu is too large to be a TPM
handle, TPM handles are unsigned 32-bit integers", num);
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value " PRIuGRUB_UINT64_T " is too
large to be a TPM handle, TPM handles are unsigned 32-bit integers", num);
There's a missing "%" but it works for me:
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, "Value %"
PRIuGRUB_UINT64_T " is too large to be a TPM handle, TPM handles are
unsigned 32-bit integers", num);
Here we use the type macro to choose the correct type string for
'grub_uint64_t' to avoid the potential compiler error.
Gary Lin
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel