From 433fe005ed4d3d6f7dcf632e342802c0e3e64246 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 6 Apr 2010 11:49:34 +0200 Subject: [PATCH] Fix build on Ubuntu Hardy Using GCC-4.2.4-1ubuntu4, there were 4 warnings. --- hw/e1000.c | 2 +- microblaze-dis.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index fd3059a..34cc451 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -642,7 +642,7 @@ e1000_receive(VLANClientState *nc, const uint8_t *buf, size_t size) if (vlan_enabled(s) && is_vlan_packet(s, buf)) { vlan_special = cpu_to_le16(be16_to_cpup((uint16_t *)(buf + 14))); - memmove((void *)(buf + 4), buf, 12); + memmove((uint8_t *)buf + 4, buf, 12); vlan_status = E1000_RXD_STAT_VP; vlan_offset = 4; size -= 4; diff --git a/microblaze-dis.c b/microblaze-dis.c index b26572f..698ea7b 100644 --- a/microblaze-dis.c +++ b/microblaze-dis.c @@ -789,7 +789,6 @@ read_insn_microblaze (bfd_vma memaddr, int print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) { - fprintf_ftype fprintf = info->fprintf_func; void * stream = info->stream; unsigned long inst, prev_inst; struct op_code_struct * op, *pop; @@ -826,7 +825,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) prev_insn_vma = curr_insn_vma; if (op->name == 0) { - fprintf (stream, ".short 0x%04x", inst); + fprintf (stream, ".short 0x%04lx", inst); } else { @@ -959,7 +958,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) break; default: /* if the disassembler lags the instruction set */ - fprintf (stream, "\tundecoded operands, inst is 0x%04x", inst); + fprintf (stream, "\tundecoded operands, inst is 0x%04lx", inst); break; } } -- 1.7.0.4