Avoid void * pointer arithmetic; cast to UINT8 * explicitly.

No binary changes for aarch64 at least.
This commit is contained in:
rin 2023-06-14 00:52:25 +00:00
parent dea74b4df0
commit fc7406911a
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: efiblock.c,v 1.19 2022/04/24 06:49:38 mlelstv Exp $ */
/* $NetBSD: efiblock.c,v 1.20 2023/06/14 00:52:25 rin Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <nonaka@netbsd.org>
@ -442,7 +442,7 @@ efi_block_find_partitions_gpt(struct efi_block_dev *bdev)
}
for (entry = 0; entry < le32toh(hdr.hdr_entries); entry++) {
memcpy(&ent, buf + (entry * le32toh(hdr.hdr_entsz)),
memcpy(&ent, (UINT8 *)buf + (entry * le32toh(hdr.hdr_entsz)),
sizeof(ent));
efi_block_find_partitions_gpt_entry(bdev, &hdr, &ent, entry);
}