summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2013-10-02 21:20:23 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2013-10-02 21:20:23 +0000
commit95bf8816178dfe33b45d4c53573b9f092f478b75 (patch)
treeb9094cefc6409baa836fb76cf8acad4f0dfcc51f /sys
parent694a5d3ef32064999cc80945258f96cf553308a8 (diff)
Format string fixes
- cast void * before using as %s - imm2 is int
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/db_disasm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/db_disasm.c b/sys/arch/amd64/amd64/db_disasm.c
index 3f154bb8a87..0d09f5a0f63 100644
--- a/sys/arch/amd64/amd64/db_disasm.c
+++ b/sys/arch/amd64/amd64/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.9 2008/10/06 20:42:02 chl Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.10 2013/10/02 21:20:22 sf Exp $ */
/* $NetBSD: db_disasm.c,v 1.11 1996/05/03 19:41:58 christos Exp $ */
/*
@@ -1222,7 +1222,7 @@ db_disasm(db_addr_t loc, boolean_t altfmt)
if (size == WORD)
db_printf("%s", i_name);
else if (size == LONG)
- db_printf("%s", ip->i_extra);
+ db_printf("%s", (char *)ip->i_extra);
else {
char *cp = ip->i_extra;
while (*cp)
@@ -1398,7 +1398,7 @@ db_disasm(db_addr_t loc, boolean_t altfmt)
case OS: //XXX
get_value_inc(imm, loc, len, FALSE); /* offset */
get_value_inc(imm2, loc, 2, FALSE); /* segment */
- db_printf("$0x%#lx", imm2);
+ db_printf("$0x%#x", imm2);
break;
}
}