Skip to contentSkip to conversation

virtio: Fix compilation issue on freebsd

PATCH Applied Ouyang Changchun 3 participants 3 messages Feb 27, 2015 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio: Fix compilation issue on freebsd

This patch fixes the compilation issue on freebsd:

/root/qwan/tmp/dpdk_org/lib/librte_pmd_virtio/virtio_ethdev.c: In function 'virtio_resource_init':
/root/qwan/tmp/dpdk_org/lib/librte_pmd_virtio/virtio_ethdev.c:1071:56: error: unused parameter 'pci_dev' [-Werror=unused-parameter] static int virtio_resource_init(struct rte_pci_device *pci_dev)

                                                        ^

cc1: all warnings being treated as errors

---
 lib/librte_pmd_virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_virtio/virtio_ethdev.c +1 -1
index 9eb0217..88ecd57 100644
@@ -1068,7 +1068,7 @@ virtio_has_msix(const struct rte_pci_addr *loc __rte_unused)
 	return 0;
 }
 
-static int virtio_resource_init(struct rte_pci_device *pci_dev)
+static int virtio_resource_init(struct rte_pci_device *pci_dev __rte_unused)
 {
 	/* no setup required */
 	return 0;
Signature · 1 line
1.8.4.2

A message that is not in the archive (sent off-list or not yet received): 1425004210-4044-1-git-send-email-changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

#2 lore raw

Hi,

Quoted 36 lines

-----Original Message-----
From: Ouyang, Changchun
Sent: Friday, February 27, 2015 10:30 AM
To: [email protected]
Cc: Liang, Cunming; Cao, Waterman; Ouyang, Changchun
Subject: [PATCH] virtio: Fix compilation issue on freebsd

This patch fixes the compilation issue on freebsd:

/root/qwan/tmp/dpdk_org/lib/librte_pmd_virtio/virtio_ethdev.c: In function 'virtio_resource_init':
/root/qwan/tmp/dpdk_org/lib/librte_pmd_virtio/virtio_ethdev.c:1071:56: error:
unused parameter 'pci_dev' [-Werror=unused-parameter] static int virtio_resource_init(struct rte_pci_device *pci_dev)

                                                        ^

cc1: all warnings being treated as errors

---
 lib/librte_pmd_virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_virtio/virtio_ethdev.c +1 -1
index 9eb0217..88ecd57 100644
@@ -1068,7 +1068,7 @@ virtio_has_msix(const struct rte_pci_addr *loc
 __rte_unused)
 	return 0;
 }
 
-static int virtio_resource_init(struct rte_pci_device *pci_dev)
+static int virtio_resource_init(struct rte_pci_device *pci_dev __rte_unused)
 {
 	/* no setup required */
Quoted 3 lines

return 0;
--
1.8.4.2

A message that is not in the archive (sent off-list or not yet received): D0158A423229094DA7ABF71CF2FA0DA3118DF6F0-E2R4CRU6q/[email protected]

#4 lore raw
Quoted 10 lines
Quoted 10 lines

This patch fixes the compilation issue on freebsd:

/root/qwan/tmp/dpdk_org/lib/librte_pmd_virtio/virtio_ethdev.c: In function 'virtio_resource_init':
/root/qwan/tmp/dpdk_org/lib/librte_pmd_virtio/virtio_ethdev.c:1071:56: error:
unused parameter 'pci_dev' [-Werror=unused-parameter] static int virtio_resource_init(struct rte_pci_device *pci_dev)

                                                        ^

cc1: all warnings being treated as errors

Quoted 3 lines
Quoted 1 line

Applied, thanks