summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acpidump
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2008-09-10 14:59:51 +0000
committermiod <miod@openbsd.org>2008-09-10 14:59:51 +0000
commit87e993edadd0158d084aec23fc7d7b1252754670 (patch)
tree99991bb9b56e4b7cfebefca5f7feb47f4e7a18cb /usr.sbin/acpidump
parent+.Xr pflow 4 , (diff)
downloadwireguard-openbsd-87e993edadd0158d084aec23fc7d7b1252754670.tar.xz
wireguard-openbsd-87e993edadd0158d084aec23fc7d7b1252754670.zip
Proper format string modifiers and missing includes to get correct prototypes
on 64-bit systems.
Diffstat (limited to 'usr.sbin/acpidump')
-rw-r--r--usr.sbin/acpidump/acpidump.c6
-rw-r--r--usr.sbin/acpidump/aml/aml_common.c12
-rw-r--r--usr.sbin/acpidump/aml/aml_memman.c26
3 files changed, 22 insertions, 22 deletions
diff --git a/usr.sbin/acpidump/acpidump.c b/usr.sbin/acpidump/acpidump.c
index 68f1718691c..a67179d24ea 100644
--- a/usr.sbin/acpidump/acpidump.c
+++ b/usr.sbin/acpidump/acpidump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidump.c,v 1.4 2007/10/19 18:34:31 deraadt Exp $ */
+/* $OpenBSD: acpidump.c,v 1.5 2008/09/10 14:59:51 miod Exp $ */
/*-
* Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
* All rights reserved.
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: acpidump.c,v 1.4 2007/10/19 18:34:31 deraadt Exp $
+ * $Id: acpidump.c,v 1.5 2008/09/10 14:59:51 miod Exp $
* $FreeBSD: src/usr.sbin/acpi/acpidump/acpidump.c,v 1.3 2000/11/08 02:37:00 iwasaki Exp $
*/
@@ -33,6 +33,7 @@
#include <assert.h>
#include <err.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include "acpidump.h"
@@ -42,7 +43,6 @@ asl_dump_from_file(char *file)
{
u_int8_t *dp;
u_int8_t *end;
- struct ACPIsdt *dsdt;
acpi_load_dsdt(file, &dp, &end);
acpi_dump_dsdt(dp, end);
diff --git a/usr.sbin/acpidump/aml/aml_common.c b/usr.sbin/acpidump/aml/aml_common.c
index 32a97d9ac78..b5f4c3f68e2 100644
--- a/usr.sbin/acpidump/aml/aml_common.c
+++ b/usr.sbin/acpidump/aml/aml_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aml_common.c,v 1.1 2005/06/02 20:09:39 tholo Exp $ */
+/* $OpenBSD: aml_common.c,v 1.2 2008/09/10 14:59:53 miod Exp $ */
/*-
* Copyright (c) 1999 Takanori Watanabe
* Copyright (c) 1999, 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aml_common.c,v 1.1 2005/06/02 20:09:39 tholo Exp $
+ * $Id: aml_common.c,v 1.2 2008/09/10 14:59:53 miod Exp $
* $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_common.c,v 1.6 2000/11/09 06:24:45 iwasaki Exp $
*/
#include <sys/types.h>
@@ -659,8 +659,8 @@ aml_region_io_simple(struct aml_environ *env, int io, int regtype,
}
readval |= (value << (i * 8));
}
- AML_DEBUGPRINT("\t[%d:0x%x@0x%x:%d,%d]",
- regtype, readval, handle.addr, offset, bitlen);
+ AML_DEBUGPRINT("\t[%d:0x%x@%p:%d,%d]",
+ regtype, readval, (void *)handle.addr, offset, bitlen);
}
switch (io) {
@@ -681,8 +681,8 @@ aml_region_io_simple(struct aml_environ *env, int io, int regtype,
value = aml_adjust_updatevalue(flags, offset,
bitlen, readval, value);
value = aml_region_prompt_write(&handle, value);
- AML_DEBUGPRINT("\t->[%d:0x%x@0x%x:%d,%d]\n", regtype, value,
- handle.addr, offset, bitlen);
+ AML_DEBUGPRINT("\t->[%d:0x%x@%p:%d,%d]\n", regtype, value,
+ (void *)handle.addr, offset, bitlen);
for (i = 0; i < bytelen; i += handle.unit) {
state = aml_region_write_simple(&handle, i, value);
if (state == -1) {
diff --git a/usr.sbin/acpidump/aml/aml_memman.c b/usr.sbin/acpidump/aml/aml_memman.c
index eb19e3533d8..ea14ab34da7 100644
--- a/usr.sbin/acpidump/aml/aml_memman.c
+++ b/usr.sbin/acpidump/aml/aml_memman.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aml_memman.c,v 1.2 2006/02/06 21:46:40 jmc Exp $ */
+/* $OpenBSD: aml_memman.c,v 1.3 2008/09/10 14:59:53 miod Exp $ */
/*-
* Copyright (c) 1999, 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
* All rights reserved.
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aml_memman.c,v 1.2 2006/02/06 21:46:40 jmc Exp $
+ * $Id: aml_memman.c,v 1.3 2008/09/10 14:59:53 miod Exp $
* $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_memman.c,v 1.2 2000/11/09 06:24:45 iwasaki Exp $
*/
@@ -408,7 +408,7 @@ memman_freeall(struct memman *memman)
}
LIST_FOREACH(info, &memman->flexmem_info_list, links) {
- printf("memman_freeall: flex size (size = %d, addr = %p)\n",
+ printf("memman_freeall: flex size (size = %zu, addr = %p)\n",
info->mem_size, info->addr);
memman_free_flexsize(memman, info->addr);
}
@@ -422,9 +422,9 @@ memman_statistics_fixedsize(struct memman *memman)
printf(" system malloc(): %d times\n", memman->salloc_called);
printf(" free(): %d times\n", memman->free_called);
printf(" system free(): %d times\n", memman->sfree_called);
- printf(" required memory: %d bytes\n", memman->required_mem);
- printf(" allocated memory: %d bytes\n", memman->allocated_mem);
- printf(" reclaimed memory: %d bytes\n", memman->reclaimed_mem);
+ printf(" required memory: %zu bytes\n", memman->required_mem);
+ printf(" allocated memory: %zu bytes\n", memman->allocated_mem);
+ printf(" reclaimed memory: %zu bytes\n", memman->reclaimed_mem);
}
static void
@@ -437,13 +437,13 @@ memman_statistics_flexsize(struct memman *memman)
printf(" system malloc(): %d times\n", memman->flex_salloc_called);
printf(" free(): %d times\n", memman->flex_free_called);
printf(" system free(): %d times\n", memman->flex_sfree_called);
- printf(" required memory: %d bytes\n", memman->flex_required_mem);
- printf(" allocated memory: %d bytes\n", memman->flex_allocated_mem);
- printf(" reclaimed memory: %d bytes\n", memman->flex_reclaimed_mem);
- printf(" peak memory usage: %d bytes\n", memman->flex_peak_mem_usage);
- printf(" min memory size: %d bytes\n", memman->flex_mem_size_min);
- printf(" max memory size: %d bytes\n", memman->flex_mem_size_max);
- printf(" avg memory size: %d bytes\n",
+ printf(" required memory: %zu bytes\n", memman->flex_required_mem);
+ printf(" allocated memory: %zu bytes\n", memman->flex_allocated_mem);
+ printf(" reclaimed memory: %zu bytes\n", memman->flex_reclaimed_mem);
+ printf(" peak memory usage: %zu bytes\n", memman->flex_peak_mem_usage);
+ printf(" min memory size: %zu bytes\n", memman->flex_mem_size_min);
+ printf(" max memory size: %zu bytes\n", memman->flex_mem_size_max);
+ printf(" avg memory size: %zu bytes\n",
(memman->flex_alloc_called) ?
memman->flex_allocated_mem / memman->flex_alloc_called : 0);