Module Name:    src
Committed By:   rin
Date:           Wed Jun 14 00:52:25 UTC 2023

Modified Files:
        src/sys/stand/efiboot: efiblock.c

Log Message:
Avoid void * pointer arithmetic; cast to UINT8 * explicitly.
No binary changes for aarch64 at least.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/efiblock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/efiblock.c
diff -u src/sys/stand/efiboot/efiblock.c:1.19 src/sys/stand/efiboot/efiblock.c:1.20
--- src/sys/stand/efiboot/efiblock.c:1.19	Sun Apr 24 06:49:38 2022
+++ src/sys/stand/efiboot/efiblock.c	Wed Jun 14 00:52:25 2023
@@ -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 <non...@netbsd.org>
@@ -442,7 +442,7 @@ efi_block_find_partitions_gpt(struct efi
 	}
 
 	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);
 	}

Reply via email to