Skip to contentSkip to conversation

hw/imx_avic.c: Avoid format error when target_phys_addr_t is 64 bits

PATCH In review Peter Maydell 2 participants 2 messages Jul 10, 2012 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/imx_avic.c: Avoid format error when target_phys_addr_t is 64 bits

Add a missing cast to avoid gcc complaining about format string errors when printing an expression based on a target_phys_addr_t.

---
 hw/imx_avic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/imx_avic.c +1 -1
index 25f47f3..4f010e8 100644
@@ -267,7 +267,7 @@ static void imx_avic_write(void *opaque, target_phys_addr_t offset,
     /* Vector Registers not yet supported */
     if (offset >= 0x100 && offset <= 0x2fc) {
         IPRINTF("imx_avic_write to vector register %d ignored\n",
-                (offset - 0x100) >> 2);
+                (unsigned int)((offset - 0x100) >> 2));
         return;
     }
 
Signature · 1 line
1.7.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Maydell <[email protected]> writes:

Peter> Add a missing cast to avoid gcc complaining about format string Peter> errors when printing an expression based on a
Peter> target_phys_addr_t.

Peter> Signed-off-by: Peter Maydell <[email protected]>

--
Dr Peter Chubb peter.chubb AT nicta.com.au
http://www.ssrg.nicta.com.au Software Systems Research Group/NICTA