Patchwork [v1,3/4] zynq_slcr: Compile time warning fixes.

login
register
mail settings
Submitter Peter Crosthwaite
Date Dec. 4, 2012, 6:04 a.m.
Message ID <bf5f902df566826015586252b67754889111c27b.1354600680.git.peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/203568/
State New
Headers show

Comments

Peter Crosthwaite - Dec. 4, 2012, 6:04 a.m.
Few warnings when compiled with debug printfs enabled. Fixed all.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/zynq_slcr.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
Peter Maydell - Dec. 4, 2012, 6:19 p.m.
On 4 December 2012 06:04, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> Few warnings when compiled with debug printfs enabled. Fixed all.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

Patch

diff --git a/hw/zynq_slcr.c b/hw/zynq_slcr.c
index dde4306..f55ab8d 100644
--- a/hw/zynq_slcr.c
+++ b/hw/zynq_slcr.c
@@ -334,7 +334,7 @@  static uint64_t zynq_slcr_read(void *opaque, hwaddr offset,
 {
     uint32_t ret = zynq_slcr_read_imp(opaque, offset);
 
-    DB_PRINT("addr: %08x data: %08x\n", offset, ret);
+    DB_PRINT("addr: %08x data: %08x\n", (unsigned)offset, (unsigned)ret);
     return ret;
 }
 
@@ -343,7 +343,7 @@  static void zynq_slcr_write(void *opaque, hwaddr offset,
 {
     ZynqSLCRState *s = (ZynqSLCRState *)opaque;
 
-    DB_PRINT("offset: %08x data: %08x\n", offset, (unsigned)val);
+    DB_PRINT("offset: %08x data: %08x\n", (unsigned)offset, (unsigned)val);
 
     switch (offset) {
     case 0x00: /* SCL */
@@ -476,7 +476,8 @@  static void zynq_slcr_write(void *opaque, hwaddr offset,
             break;
         default:
         bad_reg:
-            DB_PRINT("Bad register write %x <= %08x\n", (int)offset, val);
+            DB_PRINT("Bad register write %x <= %08x\n", (int)offset,
+                     (unsigned)val);
         }
     } else {
         DB_PRINT("SCLR registers are locked. Unlock them first\n");