[dpdk-dev] net/virtio-user: fix 32-bit build

Message ID 1466715233-7278-1-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Thomas Monjalon June 23, 2016, 8:53 p.m. UTC
  The compilation for 32-bit fails when CONFIG_RTE_VIRTIO_USER is enabled:

  drivers/net/virtio/virtio_user_ethdev.c:84:47:
    error: format ‘%llu’ expects argument of type ‘long long unsigned int’,
    but argument 5 has type ‘size_t {aka unsigned int}’

Fixes: e9efa4d93821 ("net/virtio-user: add new virtual PCI driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon June 23, 2016, 8:56 p.m. UTC | #1
2016-06-23 22:53, Thomas Monjalon:
> The compilation for 32-bit fails when CONFIG_RTE_VIRTIO_USER is enabled:
> 
>   drivers/net/virtio/virtio_user_ethdev.c:84:47:
>     error: format ‘%llu’ expects argument of type ‘long long unsigned int’,
>     but argument 5 has type ‘size_t {aka unsigned int}’
> 
> Fixes: e9efa4d93821 ("net/virtio-user: add new virtual PCI driver")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Applied
  

Patch

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 9216182..5ab2471 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -81,7 +81,7 @@  virtio_user_write_dev_config(struct virtio_hw *hw, size_t offset,
 		for (i = 0; i < ETHER_ADDR_LEN; ++i)
 			dev->mac_addr[i] = ((const uint8_t *)src)[i];
 	else
-		PMD_DRV_LOG(ERR, "not supported offset=%" PRIu64 ", len=%d\n",
+		PMD_DRV_LOG(ERR, "not supported offset=%zu, len=%d\n",
 			    offset, length);
 }