[PATCH 6/9] virtio_mmio: Cast &resources[1].start to âunsigned int *â to rid compiler warning

From: Lee Jones
Date: Sat Nov 03 2012 - 18:04:09 EST


drivers/virtio/virtio_mmio.c: In function âvm_cmdline_setâ:
drivers/virtio/virtio_mmio.c:535:4: warning: format â%uâ expects argument of type âunsigned int *â, but argument 4 has type âresource_size_t *â [-Wformat]

Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/virtio/virtio_mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 6b1b7e1..077e9ca 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -531,7 +531,7 @@ static int vm_cmdline_set(const char *device,
resources[0].end = memparse(device, &str) - 1;

processed = sscanf(str, "@%lli:%u%n:%d%n",
- &base, &resources[1].start, &consumed,
+ &base, (unsigned int *)&resources[1].start, &consumed,
&vm_cmdline_id, &consumed);

if (processed < 2 || processed > 3 || str[consumed])
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/