Add casts to make this compile when KLOADER_DEBUG is defined.

This commit is contained in:
peter 2005-09-24 11:27:04 +00:00
parent 84ba0cabfa
commit 0d776139dc
1 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kloader.c,v 1.4 2005/09/24 11:20:07 peter Exp $ */ /* $NetBSD: kloader.c,v 1.5 2005/09/24 11:27:04 peter Exp $ */
/*- /*-
* Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc. * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.4 2005/09/24 11:20:07 peter Exp $"); __KERNEL_RCSID(0, "$NetBSD: kloader.c,v 1.5 2005/09/24 11:27:04 peter Exp $");
#include "debug_kloader.h" #include "debug_kloader.h"
@ -288,7 +288,7 @@ kloader_load()
+ shstrsz /* rounded to 4 bytes */ + shstrsz /* rounded to 4 bytes */
+ sh[symndx].sh_size + sh[symndx].sh_size
+ sh[strndx].sh_size; + sh[strndx].sh_size;
DPRINTF("ksyms size = 0x%x\n", ksymsz); DPRINTF("ksyms size = 0x%x\n", (unsigned int)ksymsz);
} }
sz += ROUND4(ksymsz); sz += ROUND4(ksymsz);
@ -517,8 +517,8 @@ kloader_from_file(vaddr_t dst, off_t ofs, size_t sz)
if (freesz > sz) if (freesz > sz)
freesz = sz; freesz = sz;
DPRINTFN(1, "0x%08lx + 0x%x <- 0x%lx\n", dst, freesz, DPRINTFN(1, "0x%08lx + 0x%x <- 0x%lx\n", dst,
(unsigned long)ofs); (unsigned int)freesz, (unsigned long)ofs);
kloader_read(ofs, freesz, (void *)(tag->src + tag->sz)); kloader_read(ofs, freesz, (void *)(tag->src + tag->sz));
tag->sz += freesz; tag->sz += freesz;
@ -542,7 +542,8 @@ kloader_copy(vaddr_t dst, const void *src, size_t sz)
if (freesz > sz) if (freesz > sz)
freesz = sz; freesz = sz;
DPRINTFN(1, "0x%08lx + 0x%x <- %p\n", dst, freesz, src); DPRINTFN(1, "0x%08lx + 0x%x <- %p\n", dst,
(unsigned int)freesz, src);
memcpy((void *)(tag->src + tag->sz), src, freesz); memcpy((void *)(tag->src + tag->sz), src, freesz);
tag->sz += freesz; tag->sz += freesz;
@ -566,7 +567,7 @@ kloader_zero(vaddr_t dst, size_t sz)
if (freesz > sz) if (freesz > sz)
freesz = sz; freesz = sz;
DPRINTFN(1, "0x%08lx + 0x%x\n", dst, freesz); DPRINTFN(1, "0x%08lx + 0x%x\n", dst, (unsigned int)freesz);
memset((void *)(tag->src + tag->sz), 0, freesz); memset((void *)(tag->src + tag->sz), 0, freesz);
tag->sz += freesz; tag->sz += freesz;