svn commit: r363572 - in head/stand/efi/loader/arch: arm riscv
Jessica Clarke
jrtc27 at FreeBSD.org
Sun Jul 26 18:17:37 UTC 2020
Author: jrtc27
Date: Sun Jul 26 18:17:36 2020
New Revision: 363572
URL: https://svnweb.freebsd.org/changeset/base/363572
Log:
loader: Avoid -Wpointer-to-int cast warnings for Arm and RISC-V
On RISC-V, Clang warns with:
cast to smaller integer type 'unsigned int' from 'void (*)(void *)'
Instead, use %p as the standard format specifier for printing pointers.
Whilst Arm's pointer size is the same as unsigned, it's still cleaner to
use the right thing there too.
Reviewed by: brooks (mentor), emaste
Approved by: brooks (mentor), emaste
Differential Revision: https://reviews.freebsd.org/D25718
Modified:
head/stand/efi/loader/arch/arm/exec.c
head/stand/efi/loader/arch/riscv/exec.c
Modified: head/stand/efi/loader/arch/arm/exec.c
==============================================================================
--- head/stand/efi/loader/arch/arm/exec.c Sun Jul 26 18:15:16 2020 (r363571)
+++ head/stand/efi/loader/arch/arm/exec.c Sun Jul 26 18:17:36 2020 (r363572)
@@ -77,7 +77,7 @@ __elfN(arm_exec)(struct preloaded_file *fp)
entry = efi_translate(e->e_entry);
- printf("Kernel entry at 0x%x...\n", (unsigned)entry);
+ printf("Kernel entry at %p...\n", entry);
printf("Kernel args: %s\n", fp->f_args);
if ((error = bi_load(fp->f_args, &modulep, &kernend)) != 0) {
Modified: head/stand/efi/loader/arch/riscv/exec.c
==============================================================================
--- head/stand/efi/loader/arch/riscv/exec.c Sun Jul 26 18:15:16 2020 (r363571)
+++ head/stand/efi/loader/arch/riscv/exec.c Sun Jul 26 18:17:36 2020 (r363572)
@@ -63,7 +63,7 @@ __elfN(exec)(struct preloaded_file *fp)
entry = efi_translate(e->e_entry);
- printf("Kernel entry at 0x%x...\n", (unsigned)entry);
+ printf("Kernel entry at %p...\n", entry);
printf("Kernel args: %s\n", fp->f_args);
if ((error = bi_load(fp->f_args, &modulep, &kernend)) != 0) {
More information about the svn-src-head
mailing list