From c9dba66abe8f4c4df28f3b32befe49da1b749a48 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 30 Jul 2008 16:24:54 +0100 Subject: [PATCH] Fix warnings [This] patch fixes two warnings when compiling. Signed-off-by: Andre Przywara --- hw/scsi-generic.c | 4 ++-- i386-dm/helper2.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index 60084cff..3973c258 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -478,8 +478,8 @@ static int32_t scsi_send_command(SCSIDevice *d, uint32_t tag, uint8_t *cmd, int lun) { SCSIDeviceState *s = d->state; - uint32_t len; - int cmdlen; + uint32_t len=0; + int cmdlen=0; SCSIRequest *r; int ret; diff --git a/i386-dm/helper2.c b/i386-dm/helper2.c index 6437c373..d630cb0b 100644 --- a/i386-dm/helper2.c +++ b/i386-dm/helper2.c @@ -418,7 +418,8 @@ void cpu_ioreq_timeoffset(CPUState *env, ioreq_t *req) time_offset += (unsigned long)req->data; - fprintf(logfile, "Time offset set %ld, added offset %lld\n", time_offset, req->data); + fprintf(logfile, "Time offset set %ld, added offset %"PRId64"\n", + time_offset, req->data); sprintf(b, "%ld", time_offset); xenstore_vm_write(domid, "rtc/timeoffset", b); } -- 2.39.5