summaryrefslogtreecommitdiff
path: root/stand/efi
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2020-07-26 18:17:36 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2020-07-26 18:17:36 +0000
commit4f8212c8b28fe5d87e9109cfc0e19c9396c97e8f (patch)
tree5409e98e10bcf3e0d1813960eec5adc26e67e2c3 /stand/efi
parentd63a631e72441687910b8ec4a9396ac5d05029fb (diff)
downloadsrc-test-4f8212c8b28fe5d87e9109cfc0e19c9396c97e8f.tar.gz
src-test-4f8212c8b28fe5d87e9109cfc0e19c9396c97e8f.zip
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
Notes
Notes: svn path=/head/; revision=363572
Diffstat (limited to 'stand/efi')
-rw-r--r--stand/efi/loader/arch/arm/exec.c2
-rw-r--r--stand/efi/loader/arch/riscv/exec.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/stand/efi/loader/arch/arm/exec.c b/stand/efi/loader/arch/arm/exec.c
index 5fdf8e3daa39f..86c931bcbbe8d 100644
--- a/stand/efi/loader/arch/arm/exec.c
+++ b/stand/efi/loader/arch/arm/exec.c
@@ -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) {
diff --git a/stand/efi/loader/arch/riscv/exec.c b/stand/efi/loader/arch/riscv/exec.c
index 7803932184cd4..fe40003a475b7 100644
--- a/stand/efi/loader/arch/riscv/exec.c
+++ b/stand/efi/loader/arch/riscv/exec.c
@@ -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) {