Page MenuHomeFreeBSD

D20026.id56538.diff
No OneTemporary

D20026.id56538.diff

Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
===================================================================
--- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
+++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
@@ -114,7 +114,7 @@
(void) snprintf(di->errbuf, sizeof (di->errbuf),
dgettext(TEXT_DOMAIN,
"Unable to determine path or stats for "
- "object %lld in %s"), obj, dsname);
+ "object %"PRIu64" in %s"), obj, dsname);
return (-1);
}
}
@@ -406,7 +406,7 @@
} else {
(void) snprintf(di->errbuf, sizeof (di->errbuf),
dgettext(TEXT_DOMAIN,
- "next allocated object (> %lld) find failure"),
+ "next allocated object (> %"PRIu64") find failure"),
zc.zc_obj);
di->zerr = errno;
break;
Index: stand/common/load_elf.c
===================================================================
--- stand/common/load_elf.c
+++ stand/common/load_elf.c
@@ -483,7 +483,7 @@
off += 0x01000000;
ehdr->e_entry += off;
#ifdef ELF_VERBOSE
- printf("Converted entry 0x%08x\n", ehdr->e_entry);
+ printf("Converted entry 0x%jx\n", (uintmax_t)ehdr->e_entry);
#endif
} else
off = 0;
@@ -509,8 +509,8 @@
off -= ehdr->e_entry & ~PAGE_MASK;
ehdr->e_entry += off;
#ifdef ELF_VERBOSE
- printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n",
- ehdr->e_entry, off);
+ printf("ehdr->e_entry 0x%jx", va<->pa off %llx\n",
+ (uintmax_t)ehdr->e_entry, off);
#endif
#else
off = 0; /* other archs use direct mapped kernels */
Index: stand/ofw/libofw/ofw_net.c
===================================================================
--- stand/ofw/libofw/ofw_net.c
+++ stand/ofw/libofw/ofw_net.c
@@ -225,12 +225,12 @@
dmabuf = NULL;
if (OF_call_method("dma-alloc", netinstance, 1, 1, (64 * 1024), &dmabuf)
< 0) {
- printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf);
+ printf("Failed to allocate DMA buffer (got %p).\n", dmabuf);
goto punt;
}
#if defined(NETIF_DEBUG)
- printf("ofwn_init: allocated DMA buffer: %08x\n", dmabuf);
+ printf("ofwn_init: allocated DMA buffer: %p\n", dmabuf);
#endif
#endif
Index: stand/ofw/libofw/openfirm.c
===================================================================
--- stand/ofw/libofw/openfirm.c
+++ stand/ofw/libofw/openfirm.c
@@ -669,7 +669,6 @@
}
/*
-/*
* Memory functions
*/
Index: stand/powerpc/boot1.chrp/boot1.c
===================================================================
--- stand/powerpc/boot1.chrp/boot1.c
+++ stand/powerpc/boot1.chrp/boot1.c
@@ -23,6 +23,7 @@
#include <machine/elf.h>
#include <machine/stdarg.h>
#include <machine/md_var.h>
+#include <ufs/ffs/fs.h>
#include "paths.h"
Index: stand/powerpc/kboot/Makefile
===================================================================
--- stand/powerpc/kboot/Makefile
+++ stand/powerpc/kboot/Makefile
@@ -36,9 +36,6 @@
LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
-# 64-bit bridge extensions
-CFLAGS+= -Wa,-mppc64bridge
-
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
Index: stand/powerpc/kboot/main.c
===================================================================
--- stand/powerpc/kboot/main.c
+++ stand/powerpc/kboot/main.c
@@ -484,8 +484,18 @@
void
_start(int argc, const char **argv, char **env)
{
+// This makes error "variable 'sp' is uninitialized" be just a warning on clang.
+// Initializing 'sp' is not desired here as it would overwrite "r1" original value
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wuninitialized"
+#endif
register volatile void **sp asm("r1");
main((int)sp[0], (const char **)&sp[1]);
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
}
/*
Index: stand/powerpc/ofw/elf_freebsd.c
===================================================================
--- stand/powerpc/ofw/elf_freebsd.c
+++ stand/powerpc/ofw/elf_freebsd.c
@@ -84,7 +84,7 @@
if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0)
return (error);
- printf("Kernel entry at 0x%lx ...\n", e->e_entry);
+ printf("Kernel entry at 0x%x ...\n", entry);
dev_cleanup();
if (dtbp != 0) {
Index: stand/powerpc/ofw/ppc64_elf_freebsd.c
===================================================================
--- stand/powerpc/ofw/ppc64_elf_freebsd.c
+++ stand/powerpc/ofw/ppc64_elf_freebsd.c
@@ -87,7 +87,7 @@
if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0)
return (error);
- printf("Kernel entry at 0x%lx ...\n", entry);
+ printf("Kernel entry at 0x%x ...\n", entry);
dev_cleanup();

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 23, 1:45 AM (5 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16785147
Default Alt Text
D20026.id56538.diff (4 KB)

Event Timeline