From fc7406911ad6c5cbc676719977365ffcdaf529a2 Mon Sep 17 00:00:00 2001 From: rin Date: Wed, 14 Jun 2023 00:52:25 +0000 Subject: [PATCH] Avoid void * pointer arithmetic; cast to UINT8 * explicitly. No binary changes for aarch64 at least. --- sys/stand/efiboot/efiblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/stand/efiboot/efiblock.c b/sys/stand/efiboot/efiblock.c index 08e4974f3e1b..edffb934ead0 100644 --- a/sys/stand/efiboot/efiblock.c +++ b/sys/stand/efiboot/efiblock.c @@ -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 @@ -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); }